Nebula
Loading...
Searching...
No Matches
physicsmanager.cc File Reference
#include "application/stdneb.h"
#include "physicsmanager.h"
#include "game/gameserver.h"
#include "physics/charactercontext.h"
#include "physicsinterface.h"
#include "physics/actorcontext.h"
#include "resources/resourceserver.h"
#include "components/physicsfeature.h"
#include "basegamefeature/components/basegamefeature.h"
#include "basegamefeature/components/position.h"
#include "basegamefeature/components/orientation.h"
#include "basegamefeature/components/scale.h"
#include "basegamefeature/components/velocity.h"
#include "basegamefeature/managers/transformhierarchy.h"
#include "physicsfeature/physicsfeatureunit.h"

Namespaces

namespace  PhysicsFeature
 PhysicsFeature::ScriptApi.

Functions

 PhysicsFeature::__ImplementClass (PhysicsFeature::PhysicsManager, 'PhMa', Game::Manager)
 PhysicsFeature::__ImplementSingleton (PhysicsManager) PhysicsManager
static Game::Entity PhysicsFeature::ResolveBodyEntity (Game::World *world, Game::Entity entity)
 Resolves which entity owns the physx actor a collider belongs to.
static Physics::ActorId PhysicsFeature::GetValidateActorId (Game::Entity entity, PhysicsFeature::PhysicsActor const &actor)
 Checks if the actorid is valid, and if the actor points to the correct entity, and returns a valid or invalid actor id based on the check.
static Physics::ActorId PhysicsFeature::ResolveActorHandle (Game::World *world, Game::Entity entity)
 get the physx actor of the entity
static bool PhysicsFeature::ActorIsDynamic (Physics::ActorId id)
 True if the actor is a rigid body, which covers both the kinematic and the dynamic actor type.
static Physics::ColliderType PhysicsFeature::ShapeColliderType (physx::PxShape const *pxShape)
 Converts from pxshape to our internal collider type enum.
static bool PhysicsFeature::HasColliderOfType (Game::World *world, Game::Entity entity, int colliderClass)
 True if the entity still has the collider component matching a physx shape of this type.
static bool PhysicsFeature::ShapeBelongsTo (Physics::ShapeId id, Game::Entity entity)
 True when a shape name held by a handle still names the shape its entity built.
static Physics::ShapeId PhysicsFeature::FindShapeForEntity (Physics::ActorId actorId, Game::Entity entity)
static Util::FixedArray< Game::ComponentId > const & PhysicsFeature::ColliderComponents ()
 The collider components.
static bool PhysicsFeature::HasOtherCollider (Game::World *world, Game::Entity entity, Game::ComponentId component)
 True when the entity has a collider component other than this one.
static void PhysicsFeature::ClearShapeField (Game::World *world, Game::Entity entity)
static void PhysicsFeature::GarbageCollectShapes (Game::World *world, Game::Entity bodyEntity, Physics::ActorId actorId)
 Releases the shapes of an actor whose collider component is gone, or whose collider entity has been moved to another body.
static void PhysicsFeature::MarkOwnedShapes (Game::World *world, Physics::ActorId actorId)
 Queues the entities whose shapes hang off an actor which is about to be released, so that their shapes get built again on whichever actor they end up on.
static void PhysicsFeature::BuildActorFromPhysicsResource (Game::World *world, Game::Entity entity, PhysicsFeature::PhysicsActor &self)
static void PhysicsFeature::BuildRigidbody (Game::World *world, Game::Entity entity, PhysicsFeature::PhysicsActor &actor)
static void PhysicsFeature::BuildStaticBody (Game::World *world, Game::Entity entity, PhysicsFeature::PhysicsActor &actor)
static bool PhysicsFeature::BuildCollider (Game::World *world, Game::Entity entity, PhysicsFeature::PhysicsActor &actor, Physics::ColliderDescription &desc)
static bool PhysicsFeature::BuildBoxCollider (Game::World *world, Game::Entity entity, PhysicsFeature::PhysicsActor &actor)
static bool PhysicsFeature::BuildSphereCollider (Game::World *world, Game::Entity entity, PhysicsFeature::PhysicsActor &actor)
static bool PhysicsFeature::BuildCapsuleCollider (Game::World *world, Game::Entity entity, PhysicsFeature::PhysicsActor &actor)
static bool PhysicsFeature::BuildPlaneCollider (Game::World *world, Game::Entity entity, PhysicsFeature::PhysicsActor &actor)
static bool PhysicsFeature::BuildMeshCollider (Game::World *world, Game::Entity entity, PhysicsFeature::PhysicsActor &actor)
static bool PhysicsFeature::BuildHeightFieldCollider (Game::World *world, Game::Entity entity, PhysicsFeature::PhysicsActor &actor)
static void PhysicsFeature::PushActorPose (Game::World *world, Game::Entity entity, Physics::ActorId actorId)
 Pushes the transform of the entity onto its actor.
static Math::vec3 PhysicsFeature::CharacterCenter (Game::World *world, Game::Entity entity, PhysicsFeature::Character const &character)
 The center PhysX wants on the desc, from the entity's Position, which is the foot of the character.
static void PhysicsFeature::OnCharacterHit (Physics::CharacterHitEvent const &event)
static void PhysicsFeature::BuildCharacter (Game::World *world, Game::Entity entity, PhysicsFeature::PhysicsActor &actor)
 Builds the controller of an entity from its component.
static bool PhysicsFeature::RebuildPhysicsEntity (Game::World *world, Game::Entity entity, PhysicsFeature::PhysicsActor &actor, uint32_t const pending)
 Creates, updates and releases physx actors and shapes for one entity, according to what is queued for it.
static void PhysicsFeature::EnsureHandle (Game::World *world, Game::Entity entity)
void PhysicsFeature::PollPhysicsResourceTransforms (Game::World *world, Game::Entity entity, Game::Position &position, Game::Orientation &orientation, PhysicsFeature::PhysicsResource const &, PhysicsFeature::PhysicsActor const &handle)
void PhysicsFeature::PassKinematicTransforms (Game::World *world, Game::Entity entity, Game::Position const &position, Game::Orientation const &orientation, PhysicsFeature::PhysicsResource const &, PhysicsFeature::IsKinematic, PhysicsFeature::PhysicsActor const &handle)
void PhysicsFeature::PollRigidbodyTransform (Game::World *world, Game::Entity entity, PhysicsFeature::Rigidbody const &body, Game::Position &position, Game::Orientation &orientation, PhysicsFeature::PhysicsActor const &handle)
void PhysicsFeature::WriteKinematicRigidbody (Game::World *world, Game::Entity entity, PhysicsFeature::Rigidbody const &body, Game::Position const &position, Game::Orientation const &orientation, PhysicsFeature::PhysicsActor const &handle)