14#ifndef PHYSXCONTROLLER_H
15#define PHYSXCONTROLLER_H
30class EXPCL_PANDAPHYSX PhysxController :
public PhysxObject,
public PhysxEnums {
37 void set_pos(
const LPoint3f &pos);
49 void set_h(
float heading);
56 INLINE
void ls()
const;
57 INLINE
void ls(std::ostream &out,
int indent_level=0)
const;
60 void update_controller(
float dt);
62 static PhysxController *factory(NxControllerType shapeType);
64 virtual NxController *ptr()
const = 0;
66 virtual void link(NxController *controllerPtr) = 0;
67 virtual void unlink() = 0;
70 INLINE PhysxController();
73 NxReal get_jump_height(
float dt, NxVec3 &gravity);
89 NxHeightFieldAxis _up_axis;
95 static void init_type() {
96 PhysxObject::init_type();
98 PhysxObject::get_class_type());
101 return get_class_type();
105 return get_class_type();
Actors are the main simulation objects.
void set_sharpness(float sharpness)
Sharpness is used to smooth motion with a feedback filter, having a value between 0 (so smooth it doe...
float get_h() const
Returns the heading of the controller in global space.
PhysxActor * get_actor() const
Retrieves the actor which this controller is associated with.
float get_sharpness() const
Returns the sharpness used to ease the motion curve when the auto-step feature is used.
void set_min_distance(float min_dist)
Sets the the minimum travelled distance to consider when moving the controller.
void stop_jump()
Leaves the jump mode.
void set_global_speed(const LVector3f &speed)
Sets the linear speed of the controller in global space.
void set_h(float heading)
Sets the heading of the controller is global space.
void set_step_offset(float offset)
Sets the step height/offset for the controller.
void start_jump(float v0)
Enters the jump mode.
void report_scene_changed()
The character controller uses caching in order to speed up collision testing, this caching can not de...
void set_omega(float omega)
Sets the angular velocity (degrees per second) of the controller.
LPoint3f get_pos() const
Retruns the position of the controller is global space.
void set_local_speed(const LVector3f &speed)
Sets the linear speed of the controller in local coordinates.
void set_collision(bool enable)
Enable/Disable collisions for this controller and actor.
void set_pos(const LPoint3f &pos)
Sets the position of the controller is global space.
This class exists just to provide scoping for the enums shared by PhysX classes.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...