Panda3D
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

PhysxWheelShape Class Reference

A special shape used for simulating a car wheel. More...

#include "physxWheelShape.h"

Inheritance diagram for PhysxWheelShape:
PhysxShape PhysxObject PhysxEnums TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

Public Types

enum  PhysxActorFlag {
  AF_disable_collision = NX_AF_DISABLE_COLLISION, AF_disable_response = NX_AF_DISABLE_RESPONSE, AF_lock_com = NX_AF_LOCK_COM, AF_fluid_disable_collision = NX_AF_FLUID_DISABLE_COLLISION,
  AF_contact_modification = NX_AF_CONTACT_MODIFICATION, AF_force_cone_friction = NX_AF_FORCE_CONE_FRICTION, AF_user_actor_pair_filtering = NX_AF_USER_ACTOR_PAIR_FILTERING
}
enum  PhysxBodyFlag {
  BF_disable_gravity = NX_BF_DISABLE_GRAVITY, Bf_frozen_pos_x = NX_BF_FROZEN_POS_X, BF_frozen_pos_y = NX_BF_FROZEN_POS_Y, BF_frozen_pos_z = NX_BF_FROZEN_POS_Z,
  BF_frozen_rot_x = NX_BF_FROZEN_ROT_X, BF_frozen_rot_y = NX_BF_FROZEN_ROT_Y, BF_frozen_rot_z = NX_BF_FROZEN_ROT_Z, BF_frozen_pos = NX_BF_FROZEN_POS,
  BF_frozen_rot = NX_BF_FROZEN_ROT, BF_frozen = NX_BF_FROZEN, BF_kinematic = NX_BF_KINEMATIC, BF_visualization = NX_BF_VISUALIZATION,
  BF_filter_sleep_vel = NX_BF_FILTER_SLEEP_VEL, BF_energy_sleep_test = NX_BF_ENERGY_SLEEP_TEST
}
enum  PhysxBroadPhaseType { BPT_sap_single = NX_BP_TYPE_SAP_SINGLE, BPT_sap_multi = NX_BP_TYPE_SAP_MULTI }
enum  PhysxClothFlag {
  CLF_pressure = NX_CLF_PRESSURE, CLF_static = NX_CLF_STATIC, CLF_disable_collision = NX_CLF_DISABLE_COLLISION, CLF_selfcollision = NX_CLF_SELFCOLLISION,
  CLF_visualization = NX_CLF_VISUALIZATION, CLF_gravity = NX_CLF_GRAVITY, CLF_bending = NX_CLF_BENDING, CLF_bending_ortho = NX_CLF_BENDING_ORTHO,
  CLF_damping = NX_CLF_DAMPING, CLF_collision_twoway = NX_CLF_COLLISION_TWOWAY, CLF_triangle_collision = NX_CLF_TRIANGLE_COLLISION, CLF_tearable = NX_CLF_TEARABLE,
  CLF_hardware = NX_CLF_HARDWARE, CLF_comdamping = NX_CLF_COMDAMPING, CLF_validbounds = NX_CLF_VALIDBOUNDS, CLF_fluid_collision = NX_CLF_FLUID_COLLISION,
  CLF_disable_dynamic_ccd = NX_CLF_DISABLE_DYNAMIC_CCD, CLF_adhere = NX_CLF_ADHERE
}
enum  PhysxCombineMode { CM_average = NX_CM_AVERAGE, CM_min = NX_CM_MIN, CM_multiply = NX_CM_MULTIPLY, CM_max = NX_CM_MAX }
enum  PhysxContactPairFlag {
  CPF_ignore_pair = NX_IGNORE_PAIR, CPF_notify_on_start_touch = NX_NOTIFY_ON_START_TOUCH, CPF_notify_on_end_touch = NX_NOTIFY_ON_END_TOUCH, CPF_notify_on_touch = NX_NOTIFY_ON_TOUCH,
  CPF_notify_on_impact = NX_NOTIFY_ON_IMPACT, CPF_notify_on_roll = NX_NOTIFY_ON_ROLL, CPF_notify_on_slide = NX_NOTIFY_ON_SLIDE, CPF_notify_forces = NX_NOTIFY_FORCES,
  CPF_notify_on_start_touch_threshold = NX_NOTIFY_ON_START_TOUCH_FORCE_THRESHOLD, CPF_notify_on_end_touch_threshold = NX_NOTIFY_ON_END_TOUCH_FORCE_THRESHOLD, CPF_notify_on_touch_threshold = NX_NOTIFY_ON_TOUCH_FORCE_THRESHOLD, CPF_notify_contact_modifications = NX_NOTIFY_CONTACT_MODIFICATION
}
enum  PhysxD6JointDriveType { D6_joint_drive_position = NX_D6JOINT_DRIVE_POSITION, D6_joint_drive_velocity = NX_D6JOINT_DRIVE_VELOCITY }
enum  PhysxD6JointFlag { D6_joint_slerp_drive = NX_D6JOINT_SLERP_DRIVE, D6_joint_gear_disabled = NX_D6JOINT_GEAR_ENABLED }
enum  PhysxD6JointMotion { D6_joint_motion_locked = NX_D6JOINT_MOTION_LOCKED, D6_joint_motion_limited = NX_D6JOINT_MOTION_LIMITED, D6_joint_motion_free = NX_D6JOINT_MOTION_FREE }
enum  PhysxDistanceJointFlag { DJF_max_distance_enabled = NX_DJF_MAX_DISTANCE_ENABLED, DJF_mix_distance_enabled = NX_DJF_MIN_DISTANCE_ENABLED, DJF_spring_enabled = NX_DJF_SPRING_ENABLED }
enum  PhysxFilterOp {
  FO_and = NX_FILTEROP_AND, FO_or = NX_FILTEROP_OR, FO_xor = NX_FILTEROP_XOR, FO_nand = NX_FILTEROP_NAND,
  FO_nor = NX_FILTEROP_NOR, FO_nxor = NX_FILTEROP_NXOR, FO_swap_and = NX_FILTEROP_SWAP_AND
}
enum  PhysxForceFieldCoordinates { FFC_cartesian, FFC_spherical, FFC_cylindrical, FFC_toroidal }
enum  PhysxForceFieldShapeGroupFlag { FFSG_exclude_group = NX_FFSG_EXCLUDE_GROUP }
enum  PhysxForceMode {
  FM_force = NX_FORCE, FM_impulse = NX_IMPULSE, FM_velocity_change = NX_VELOCITY_CHANGE, FM_smooth_impulse = NX_SMOOTH_IMPULSE,
  FM_smooth_velocity_change = NX_SMOOTH_VELOCITY_CHANGE, FM_acceleration = NX_ACCELERATION
}
enum  PhysxJointFlag { JF_collision_enabled = NX_JF_COLLISION_ENABLED, JF_visualization = NX_JF_VISUALIZATION }
enum  PhysxMaterialFlag { MF_anisotropic = NX_MF_ANISOTROPIC, MF_disable_friction = NX_MF_DISABLE_FRICTION, MF_disable_strong_friction = NX_MF_DISABLE_STRONG_FRICTION }
enum  PhysxParameter {
  P_penalty_force = NX_PENALTY_FORCE, P_skin_width = NX_SKIN_WIDTH, P_default_sleep_lin_vel_squared = NX_DEFAULT_SLEEP_LIN_VEL_SQUARED, P_default_sleep_ang_vel_squared = NX_DEFAULT_SLEEP_ANG_VEL_SQUARED,
  P_bounce_threshold = NX_BOUNCE_THRESHOLD, P_dyn_frict_scaling = NX_DYN_FRICT_SCALING, P_sta_frict_scaling = NX_STA_FRICT_SCALING, P_max_angular_velocity = NX_MAX_ANGULAR_VELOCITY,
  P_continuous_cd = NX_CONTINUOUS_CD, P_visualization_scale = NX_VISUALIZATION_SCALE, P_adaptive_force = NX_ADAPTIVE_FORCE, P_coll_veta_jointed = NX_COLL_VETO_JOINTED,
  P_trigger_trigger_callback = NX_TRIGGER_TRIGGER_CALLBACK, P_select_hw_algo = NX_SELECT_HW_ALGO, P_ccd_epsilon = NX_CCD_EPSILON, P_solver_convergence_threshold = NX_SOLVER_CONVERGENCE_THRESHOLD,
  P_bbox_noise_level = NX_BBOX_NOISE_LEVEL, P_implicit_sweep_cache_size = NX_IMPLICIT_SWEEP_CACHE_SIZE, P_default_sleep_energy = NX_DEFAULT_SLEEP_ENERGY, P_constant_fluid_max_packets = NX_CONSTANT_FLUID_MAX_PACKETS,
  P_constant_fluid_max_particles_per_step = NX_CONSTANT_FLUID_MAX_PARTICLES_PER_STEP, P_asynchronous_mesh_creation = NX_ASYNCHRONOUS_MESH_CREATION, P_force_field_custom_kernel_epsilon = NX_FORCE_FIELD_CUSTOM_KERNEL_EPSILON, P_improved_spring_solver = NX_IMPROVED_SPRING_SOLVER,
  P_visualize_world_axes = NX_VISUALIZE_WORLD_AXES, P_visualize_body_axes = NX_VISUALIZE_BODY_AXES, P_visualize_body_mass_axes = NX_VISUALIZE_BODY_MASS_AXES, P_visualize_body_lin_velocity = NX_VISUALIZE_BODY_LIN_VELOCITY,
  P_visualize_body_ang_velocity = NX_VISUALIZE_BODY_ANG_VELOCITY, P_visualize_body_joint_groups = NX_VISUALIZE_BODY_JOINT_GROUPS, P_visualize_joint_local_axes = NX_VISUALIZE_JOINT_LOCAL_AXES, P_visualize_joint_world_axes = NX_VISUALIZE_JOINT_WORLD_AXES,
  P_visualize_joint_limits = NX_VISUALIZE_JOINT_LIMITS, P_visualize_contact_point = NX_VISUALIZE_CONTACT_POINT, P_visualize_contact_normal = NX_VISUALIZE_CONTACT_NORMAL, P_visualize_contact_error = NX_VISUALIZE_CONTACT_ERROR,
  P_visualize_contact_force = NX_VISUALIZE_CONTACT_FORCE, P_visualize_actor_axes = NX_VISUALIZE_ACTOR_AXES, P_visualize_collision_aabbs = NX_VISUALIZE_COLLISION_AABBS, P_visualize_collision_shapes = NX_VISUALIZE_COLLISION_SHAPES,
  P_visualize_collision_axes = NX_VISUALIZE_COLLISION_AXES, P_visualize_collision_compounds = NX_VISUALIZE_COLLISION_COMPOUNDS, P_visualize_collision_vnormals = NX_VISUALIZE_COLLISION_VNORMALS, P_visualize_collision_fnormals = NX_VISUALIZE_COLLISION_FNORMALS,
  P_visualize_collision_edges = NX_VISUALIZE_COLLISION_EDGES, P_visualize_collision_spheres = NX_VISUALIZE_COLLISION_SPHERES, P_visualize_collision_static = NX_VISUALIZE_COLLISION_STATIC, P_visualize_collision_dynamic = NX_VISUALIZE_COLLISION_DYNAMIC,
  P_visualize_collision_free = NX_VISUALIZE_COLLISION_FREE, P_visualize_collision_ccd = NX_VISUALIZE_COLLISION_CCD, P_visualize_collision_skeletons = NX_VISUALIZE_COLLISION_SKELETONS, P_visualize_fluid_emitters = NX_VISUALIZE_FLUID_EMITTERS,
  P_visualize_fluid_position = NX_VISUALIZE_FLUID_POSITION, P_visualize_fluid_velocity = NX_VISUALIZE_FLUID_VELOCITY, P_visualize_fluid_kernel_radius = NX_VISUALIZE_FLUID_KERNEL_RADIUS, P_visualize_fluid_bounds = NX_VISUALIZE_FLUID_BOUNDS,
  P_visualize_fluid_packets = NX_VISUALIZE_FLUID_PACKETS, P_visualize_fluid_motion_limit = NX_VISUALIZE_FLUID_MOTION_LIMIT, P_visualize_fluid_dyn_collision = NX_VISUALIZE_FLUID_DYN_COLLISION, P_visualize_fluid_stc_collision = NX_VISUALIZE_FLUID_STC_COLLISION,
  P_visualize_fluid_mesh_packets = NX_VISUALIZE_FLUID_MESH_PACKETS, P_visualize_fluid_drains = NX_VISUALIZE_FLUID_DRAINS, P_visualize_fluid_packet_data = NX_VISUALIZE_FLUID_PACKET_DATA, P_visualize_cloth_mesh = NX_VISUALIZE_CLOTH_MESH,
  P_visualize_cloth_collisions = NX_VISUALIZE_CLOTH_COLLISIONS, P_visualize_cloth_selfcollisions = NX_VISUALIZE_CLOTH_SELFCOLLISIONS, P_visualize_cloth_workpackets = NX_VISUALIZE_CLOTH_WORKPACKETS, P_visualize_cloth_sleep = NX_VISUALIZE_CLOTH_SLEEP,
  P_visualize_cloth_sleep_vertex = NX_VISUALIZE_CLOTH_SLEEP_VERTEX, P_visualize_cloth_tearable_vertices = NX_VISUALIZE_CLOTH_TEARABLE_VERTICES, P_visualize_cloth_tearing = NX_VISUALIZE_CLOTH_TEARING, P_visualize_cloth_attachment = NX_VISUALIZE_CLOTH_ATTACHMENT,
  P_visualize_cloth_validbounds = NX_VISUALIZE_CLOTH_VALIDBOUNDS, P_visualize_softbody_mesh = NX_VISUALIZE_SOFTBODY_MESH, P_visualize_softbody_collisions = NX_VISUALIZE_SOFTBODY_COLLISIONS, P_visualize_softbody_workpackets = NX_VISUALIZE_SOFTBODY_WORKPACKETS,
  P_visualize_softbody_sleep = NX_VISUALIZE_SOFTBODY_SLEEP, P_visualize_softbody_sleep_vertex = NX_VISUALIZE_SOFTBODY_SLEEP_VERTEX, P_visualize_softbody_tearable_vertices = NX_VISUALIZE_SOFTBODY_TEARABLE_VERTICES, P_visualize_softbody_tearing = NX_VISUALIZE_SOFTBODY_TEARING,
  P_visualize_softbody_attachment = NX_VISUALIZE_SOFTBODY_ATTACHMENT, P_visualize_softbody_validbounds = NX_VISUALIZE_SOFTBODY_VALIDBOUNDS, P_visualize_active_vertices = NX_VISUALIZE_ACTIVE_VERTICES, P_visualize_force_fields = NX_VISUALIZE_FORCE_FIELDS
}
enum  PhysxProjectionMode { PM_none = NX_JPM_NONE, PM_point_mindist = NX_JPM_POINT_MINDIST, PM_linear_mindist = NX_JPM_LINEAR_MINDIST }
enum  PhysxPruningStructure {
  PS_none = NX_PRUNING_NONE, PS_octree = NX_PRUNING_OCTREE, PS_quadtree = NX_PRUNING_QUADTREE, PS_dynamic_aabb_tree = NX_PRUNING_DYNAMIC_AABB_TREE,
  PS_static_aabb_tree = NX_PRUNING_STATIC_AABB_TREE
}
enum  PhysxPulleyJointFlag { PJF_is_rigid = NX_PJF_IS_RIGID, PJF_motor_enabled = NX_PJF_MOTOR_ENABLED }
enum  PhysxRevoluteJointFlag { RJF_limit_enabled = NX_RJF_LIMIT_ENABLED, RJF_motor_enabled = NX_RJF_MOTOR_ENABLED, RJF_spring_enabled = NX_RJF_SPRING_ENABLED }
enum  PhysxSceneFlag {
  SF_disable_sse = NX_SF_DISABLE_SSE, SF_disable_collisions = NX_SF_DISABLE_COLLISIONS, SF_restricted_scene = NX_SF_RESTRICTED_SCENE, SF_disable_scene_mutex = NX_SF_DISABLE_SCENE_MUTEX,
  SF_force_cone_friction = NX_SF_FORCE_CONE_FRICTION, SF_sequential_primary = NX_SF_SEQUENTIAL_PRIMARY, SF_fluid_performance_hint = NX_SF_FLUID_PERFORMANCE_HINT
}
enum  PhysxShapeFlag {
  SF_trigger_on_enter = NX_TRIGGER_ON_ENTER, SF_trigger_on_leave = NX_TRIGGER_ON_LEAVE, SF_trigger_on_stay = NX_TRIGGER_ON_STAY, SF_trigger_enable = NX_TRIGGER_ENABLE,
  SF_visualization = NX_SF_VISUALIZATION, SF_disable_collision = NX_SF_DISABLE_COLLISION, SF_disable_raycasting = NX_SF_DISABLE_RAYCASTING, SF_disable_response = NX_SF_DISABLE_RESPONSE,
  SF_disable_scene_queries = NX_SF_DISABLE_SCENE_QUERIES, SF_point_contact_force = NX_SF_POINT_CONTACT_FORCE, SF_feature_indices = NX_SF_FEATURE_INDICES, SF_dynamic_dynamic_ccd = NX_SF_DYNAMIC_DYNAMIC_CCD,
  SF_fluid_drain = NX_SF_FLUID_DRAIN, SF_fluid_disable_collision = NX_SF_FLUID_DISABLE_COLLISION, SF_fluid_twoway = NX_SF_FLUID_TWOWAY, SF_cloth_drain = NX_SF_CLOTH_DRAIN,
  SF_cloth_disable_collision = NX_SF_CLOTH_DISABLE_COLLISION, SF_cloth_twoway = NX_SF_CLOTH_TWOWAY, SF_softbody_drain = NX_SF_SOFTBODY_DRAIN, SF_softbody_disable_collision = NX_SF_SOFTBODY_DISABLE_COLLISION,
  SF_softbody_twoway = NX_SF_SOFTBODY_TWOWAY
}
enum  PhysxShapesType { ST_static = NX_STATIC_SHAPES, ST_dynamic = NX_DYNAMIC_SHAPES, ST_all = NX_ALL_SHAPES }
enum  PhysxSoftBodyFlag {
  SBF_static = NX_SBF_STATIC, SBF_disable_collision = NX_SBF_DISABLE_COLLISION, SBF_selfcollision = NX_SBF_SELFCOLLISION, SBF_visualization = NX_SBF_VISUALIZATION,
  SBF_gravity = NX_SBF_GRAVITY, SBF_volume_conservtion = NX_SBF_VOLUME_CONSERVATION, SBF_damping = NX_SBF_DAMPING, SBF_collision_twoway = NX_SBF_COLLISION_TWOWAY,
  SBF_tearable = NX_SBF_TEARABLE, SBF_hardware = NX_SBF_HARDWARE, SBF_comdamping = NX_SBF_COMDAMPING, SBF_validbounds = NX_SBF_VALIDBOUNDS,
  SBF_fluid_collision = NX_SBF_FLUID_COLLISION, SBF_disable_dynamic_ccd = NX_SBF_DISABLE_DYNAMIC_CCD, SBF_adhere = NX_SBF_ADHERE
}
enum  PhysxSphericalJointFlag {
  SJF_twist_limit_enabled = NX_SJF_TWIST_LIMIT_ENABLED, SJF_swing_limit_enabled = NX_SJF_SWING_LIMIT_ENABLED, SJF_twist_spring_enabled = NX_SJF_TWIST_SPRING_ENABLED, SJF_swing_spring_enabled = NX_SJF_SWING_SPRING_ENABLED,
  SJF_joint_spring_enabled = NX_SJF_JOINT_SPRING_ENABLED, SJF_perpendicular_dir_constraints = NX_SJF_PERPENDICULAR_DIR_CONSTRAINTS
}
enum  PhysxUpAxis { X_up = NX_X, Y_up = NX_Y, Z_up = NX_Z }
enum  PhysxVertexAttachmentStatus { VAS_none = NX_CLOTH_VERTEX_ATTACHMENT_NONE, VAS_global = NX_CLOTH_VERTEX_ATTACHMENT_GLOBAL, VAS_shape = NX_CLOTH_VERTEX_ATTACHMENT_SHAPE }
enum  PhysxWheelFlag { WF_steerable_input = 1<<0, WF_steerable_auto = 1<<1, WF_affected_by_handbrake = 1<<2, WF_accelerated = 1<<3 }
enum  PhysxWheelShapeFlag {
  WSF_wheel_axis_contact_normal = NX_WF_WHEEL_AXIS_CONTACT_NORMAL, WSF_input_lat_slipvelocity = NX_WF_INPUT_LAT_SLIPVELOCITY, WSF_input_lng_slipvelocity = NX_WF_INPUT_LNG_SLIPVELOCITY, WSF_unscaled_spring_behavior = NX_WF_UNSCALED_SPRING_BEHAVIOR,
  WSF_axle_speed_override = NX_WF_AXLE_SPEED_OVERRIDE, WSF_emulate_legacy_wheel = NX_WF_EMULATE_LEGACY_WHEEL, WSF_clamped_friction = NX_WF_CLAMPED_FRICTION
}

Public Member Functions

TypedObjectas_typed_object ()
 Returns the object, upcast (if necessary) to a TypedObject pointer.
const TypedObjectas_typed_object () const
 Returns the object, upcast (if necessary) to a TypedObject pointer.
bool check_overlap_aabb (const PhysxBounds3 &world_bounds) const
 Checks whether the shape overlaps a world-space AABB or not.
bool check_overlap_capsule (const PhysxCapsule &world_capsule) const
 Checks whether the shape overlaps a world-space capsule or not.
bool check_overlap_obb (const PhysxBox &world_box) const
 Checks whether the shape overlaps a world-space OBB or not.
bool check_overlap_sphere (const PhysxSphere &world_sphere) const
 Checks whether the shape overlaps a world-space sphere or not.
virtual TypeHandle force_init_type ()
PhysxActorget_actor () const
 Retrieves the actor which this shape is associated with.
float get_axle_speed () const
 Retrieves the current axle rotation speed.
int get_best_parent_from_Set (const std::set< int > &) const
float get_brake_torque () const
 Must be nonnegative.
bool get_flag (const PhysxShapeFlag flag) const
 Returns the specified shape flag.
unsigned short get_group () const
 Retrieves the collision group set for this shape.
PhysxGroupsMask get_groups_mask () const
 Gets 128-bit mask used for collision filtering.
float get_inverse_wheel_mass () const
 Returns the inverse mass of the wheel.
LMatrix4f get_local_mat () const
 Retrieve the transform of the shape in actor space, i.e.
LPoint3f get_local_pos () const
 Retrieve the position of the shape in actor space, i.e.
unsigned short get_material_index () const
 Returns the material index currently assigned to the shape.
float get_motor_torque () const
 Retrieves the sum engine torque on the wheel axle.
const char * get_name () const
 Returns the name string.
float get_radius () const
 Returns the radius of the sphere.
int get_ref_count () const
 Returns the current reference count.
float get_skin_width () const
 Returns the skin width.
float get_steer_angle () const
 Retrieves the steering angle, around shape Y axis.
float get_steer_angle_rad () const
 Retrieves the steering angle, around shape Y axis.
float get_suspension_travel () const
 Returns the suspension travel.
virtual TypeHandle get_type () const
int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
WeakReferenceListget_weak_list () const
 Returns the WeakReferenceList associated with this ReferenceCount object.
bool get_wheel_flag (PhysxWheelShapeFlag flag) const
 Returns the value of the specified wheel shape flag.
PhysxBounds3 get_world_bounds () const
 Returns a world space AABB enclosing this shape.
bool has_weak_list () const
 Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise.
bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly.
bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type.
void link (NxShape *shapePtr)
void local_object ()
 This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack.
void ls () const
void ls (ostream &out, int indent_level=0) const
void operator delete (void *ptr)
void operator delete (void *ptr, void *)
void operator delete (void *ptr)
void operator delete (void *ptr, void *)
void operator delete[] (void *ptr)
void operator delete[] (void *, void *)
void operator delete[] (void *, void *)
void operator delete[] (void *ptr)
void * operator new (size_t size, void *ptr)
void * operator new (size_t size)
void * operator new (size_t size)
void * operator new (size_t size, void *ptr)
void * operator new[] (size_t size)
void * operator new[] (size_t size, void *ptr)
void * operator new[] (size_t size, void *ptr)
void * operator new[] (size_t size)
NxShape * ptr () const
PhysxRaycastHit raycast (const PhysxRay &worldRay, bool firstHit, bool smoothNormal) const
void ref () const
 Explicitly increments the reference count.
void release ()
void save_to_desc (PhysxWheelShapeDesc &shapeDesc) const
 Saves the state of the shape object to a descriptor.
void set_axle_speed (float speed)
 Set the current axle rotation speed.
void set_brake_torque (float torque)
 Must be nonnegative.
void set_flag (const PhysxShapeFlag flag, bool value)
 Sets the specified shape flag.
void set_group (unsigned short group)
 Sets which collision group this shape is part of.
void set_groups_mask (const PhysxGroupsMask &mask)
 Sets 128-bit mask used for collision filtering.
void set_inverse_wheel_mass (float invMass)
 Set the inverse mass of the wheel.
void set_local_mat (const LMatrix4f &mat)
 Set the transform of the shape in actor space, i.e.
void set_local_pos (const LPoint3f &pos)
 Set the position of the shape in actor space, i.e.
void set_material (const PhysxMaterial &material)
 Assigns a material to the shape.
void set_material_index (unsigned short idx)
 Assigns a material index to the shape.
void set_motor_torque (float torque)
 Set the sum engine torque on the wheel axle.
void set_name (const char *name)
 Sets a name string for this object.
void set_radius (float radius)
 Sets the sphere radius.
void set_skin_width (float skinWidth)
 Sets the skin width.
void set_steer_angle (float angle)
 Set the steering angle, around shape Y axis.
void set_steer_angle_rad (float angle)
 Set the steering angle, around shape Y axis.
void set_suspension (const PhysxSpringDesc &spring)
 Set the data intended for car wheel suspension effects.
void set_suspension_travel (float travel)
 Set the maximum extension distance of suspension along shape's -Y axis.
void set_wheel_flag (PhysxWheelShapeFlag flag, bool value)
 Turns the specified wheel shape flag on or off.
bool test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus.
bool test_ref_count_nonzero () const
 Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
void unlink ()
virtual bool unref () const
 Explicitly decrements the reference count.
void weak_ref (WeakPointerToVoid *ptv)
 Adds the indicated PointerToVoid as a weak reference to this object.
void weak_unref (WeakPointerToVoid *ptv)
 Removes the indicated PointerToVoid as a weak reference to this object.

Static Public Member Functions

static PhysxShapefactory (NxShapeType shapeType)
static TypeHandle get_class_type ()
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.

Protected Types

enum  ErrorType { ET_empty, ET_ok, ET_released, ET_fail }

Protected Member Functions

bool do_test_ref_count_integrity () const
 Does some easy checks to make sure that the reference count isn't completely bogus.
bool do_test_ref_count_nonzero () const
 Returns true if the reference count is nonzero, false otherwise.

Protected Attributes

ErrorType _error_type

Detailed Description

A special shape used for simulating a car wheel.

The -Y axis should be directed toward the ground.

A ray is cast from the shape's origin along the -Y axis. When the ray strikes something, and the distance is:

Thus at the point of greatest possible suspension compression the wheel axle will pass through at the shape's origin. At the point greatest suspension extension the wheel axle will be a distance of suspensionTravel from the shape's origin.

The suspension's targetValue is 0 for real cars, which means that the suspension tries to extend all the way. Otherwise one can specify values [0,1] for suspensions which have a spring to pull the wheel up when it is extended too far. 0.5 will then fall halfway along suspensionTravel.

The +Z axis is the 'forward' direction of travel for the wheel. -Z is backwards. The wheel rolls forward when rotating around the positive direction around the X axis.

A positive wheel steering angle corresponds to a positive rotation around the shape's Y axis. (Castor angles are not modeled.)

The coordinate frame of the shape is rigidly fixed on the car.

Definition at line 69 of file physxWheelShape.h.


Member Function Documentation

TypedObject * TypedObject::as_typed_object ( ) [inline, inherited]

Returns the object, upcast (if necessary) to a TypedObject pointer.

Definition at line 99 of file typedObject.I.

const TypedObject * TypedObject::as_typed_object ( ) const [inline, inherited]

Returns the object, upcast (if necessary) to a TypedObject pointer.

Definition at line 110 of file typedObject.I.

bool PhysxShape::check_overlap_aabb ( const PhysxBounds3 world_bounds) const [inherited]

Checks whether the shape overlaps a world-space AABB or not.

Definition at line 396 of file physxShape.cxx.

bool PhysxShape::check_overlap_capsule ( const PhysxCapsule world_capsule) const [inherited]

Checks whether the shape overlaps a world-space capsule or not.

Definition at line 409 of file physxShape.cxx.

bool PhysxShape::check_overlap_obb ( const PhysxBox world_box) const [inherited]

Checks whether the shape overlaps a world-space OBB or not.

Definition at line 422 of file physxShape.cxx.

bool PhysxShape::check_overlap_sphere ( const PhysxSphere world_sphere) const [inherited]

Checks whether the shape overlaps a world-space sphere or not.

Definition at line 435 of file physxShape.cxx.

bool ReferenceCount::do_test_ref_count_integrity ( ) const [protected, inherited]

Does some easy checks to make sure that the reference count isn't completely bogus.

Returns true if ok, false otherwise.

Reimplemented in NodeReferenceCount, CachedTypedWritableReferenceCount, and NodeCachedReferenceCount.

Definition at line 29 of file referenceCount.cxx.

Referenced by ReferenceCount::do_test_ref_count_nonzero(), and ReferenceCount::test_ref_count_integrity().

bool ReferenceCount::do_test_ref_count_nonzero ( ) const [protected, inherited]

Returns true if the reference count is nonzero, false otherwise.

Definition at line 56 of file referenceCount.cxx.

References ReferenceCount::do_test_ref_count_integrity().

Referenced by ReferenceCount::test_ref_count_nonzero().

PhysxActor * PhysxShape::get_actor ( ) const [inherited]

Retrieves the actor which this shape is associated with.

Definition at line 96 of file physxShape.cxx.

float PhysxWheelShape::get_axle_speed ( ) const

Retrieves the current axle rotation speed.

Definition at line 267 of file physxWheelShape.cxx.

float PhysxWheelShape::get_brake_torque ( ) const

Must be nonnegative.

Very large values should lock wheel but should be stable.

Definition at line 189 of file physxWheelShape.cxx.

bool PhysxShape::get_flag ( const PhysxShapeFlag  flag) const [inherited]

Returns the specified shape flag.

Definition at line 161 of file physxShape.cxx.

unsigned short PhysxShape::get_group ( ) const [inherited]

Retrieves the collision group set for this shape.

The collision group is an integer between 0 and 31.

Definition at line 224 of file physxShape.cxx.

PhysxGroupsMask PhysxShape::get_groups_mask ( ) const [inherited]

Gets 128-bit mask used for collision filtering.

Definition at line 367 of file physxShape.cxx.

float PhysxWheelShape::get_inverse_wheel_mass ( ) const

Returns the inverse mass of the wheel.

Determines the wheel velocity that wheel torques can achieve.

Definition at line 137 of file physxWheelShape.cxx.

LMatrix4f PhysxShape::get_local_mat ( ) const [inherited]

Retrieve the transform of the shape in actor space, i.e.

relative to the actor it is owned by.

Definition at line 296 of file physxShape.cxx.

References PhysxManager::nxMat34_to_mat4(), and LMatrix4f::zeros_mat().

LPoint3f PhysxShape::get_local_pos ( ) const [inherited]

Retrieve the position of the shape in actor space, i.e.

relative to the actor it is owned by.

Definition at line 260 of file physxShape.cxx.

References PhysxManager::nxVec3_to_point3(), and LPoint3f::zero().

unsigned short PhysxShape::get_material_index ( ) const [inherited]

Returns the material index currently assigned to the shape.

Definition at line 310 of file physxShape.cxx.

float PhysxWheelShape::get_motor_torque ( ) const

Retrieves the sum engine torque on the wheel axle.

Positive or negative depending on direction

Definition at line 163 of file physxWheelShape.cxx.

const char * PhysxShape::get_name ( ) const [inherited]

Returns the name string.

Definition at line 125 of file physxShape.cxx.

float PhysxWheelShape::get_radius ( ) const

Returns the radius of the sphere.

Definition at line 85 of file physxWheelShape.cxx.

int ReferenceCount::get_ref_count ( ) const [inline, inherited]
float PhysxShape::get_skin_width ( ) const [inherited]

Returns the skin width.

Definition at line 189 of file physxShape.cxx.

float PhysxWheelShape::get_steer_angle ( ) const

Retrieves the steering angle, around shape Y axis.

The steering angle is measured in degrees.

Definition at line 215 of file physxWheelShape.cxx.

float PhysxWheelShape::get_steer_angle_rad ( ) const

Retrieves the steering angle, around shape Y axis.

The steering angle is measured in radians.

Definition at line 241 of file physxWheelShape.cxx.

float PhysxWheelShape::get_suspension_travel ( ) const

Returns the suspension travel.

Definition at line 111 of file physxWheelShape.cxx.

int TypedObject::get_type_index ( ) const [inline, inherited]

Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

This is equivalent to get_type().get_index().

Definition at line 52 of file typedObject.I.

References TypeHandle::get_index().

WeakReferenceList * ReferenceCount::get_weak_list ( ) const [inline, inherited]

Returns the WeakReferenceList associated with this ReferenceCount object.

If there has never been a WeakReferenceList associated with this object, creates one now.

Definition at line 307 of file referenceCount.I.

Referenced by ReferenceCount::weak_ref().

bool PhysxWheelShape::get_wheel_flag ( PhysxWheelShapeFlag  flag) const

Returns the value of the specified wheel shape flag.

Definition at line 300 of file physxWheelShape.cxx.

PhysxBounds3 PhysxShape::get_world_bounds ( ) const [inherited]

Returns a world space AABB enclosing this shape.

Definition at line 381 of file physxShape.cxx.

bool ReferenceCount::has_weak_list ( ) const [inline, inherited]

Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise.

In general, this will be true if there was ever a WeakPointerTo created for this object (even if there is not any for it now).

Definition at line 294 of file referenceCount.I.

Referenced by ReferenceCount::weak_unref().

static void PhysxWheelShape::init_type ( ) [inline, static]

This function is declared non-inline to work around a compiler bug in g++ 2.96.

Making it inline seems to cause problems in the optimizer.

Reimplemented from PhysxShape.

Definition at line 113 of file physxWheelShape.h.

References PhysxShape::init_type().

bool TypedObject::is_exact_type ( TypeHandle  handle) const [inline, inherited]
bool TypedObject::is_of_type ( TypeHandle  handle) const [inline, inherited]

Returns true if the current object is or derives from the indicated type.

Definition at line 63 of file typedObject.I.

References TypeHandle::is_derived_from().

Referenced by EggSliderData::add_back_pointer(), EggJointData::add_back_pointer(), CIntervalManager::add_c_interval(), XFileNode::add_child(), CollisionTraverser::add_collider(), CollisionHandlerPhysical::add_collider(), EggXfmSAnim::add_data(), CharacterJointBundle::add_node(), NonlinearImager::add_screen(), EggGroupNode::apply_first_attribute(), EggGroupNode::apply_last_attribute(), DeferredNodeProperty::apply_to_node(), RecorderController::begin_playback(), NodePath::clear_clip_plane(), EggGroupNode::clear_connected_shading(), NodePath::clear_light(), EggBase::convert_paths(), NodePath::decode_from_bam_stream(), VrpnClient::disconnect_device(), PhysicsManager::do_physics(), GraphicsStateGuardian::fetch_specified_part(), EggRenderState::fill_state(), AnimBundleNode::find_anim_bundle(), EggGroupNode::find_coordsys_entry(), XFile::find_data_object(), Character::find_joint(), EggGroupNode::find_materials(), Character::find_slider(), XFile::find_template(), EggGroupNode::find_textures(), EggMaterialCollection::find_used_materials(), EggTextureCollection::find_used_textures(), EggGroupNode::force_filenames(), EggJointData::force_initial_rest_frame(), WindowFramework::get_aspect_2d(), EggPoolUniquifier::get_category(), EggGroupUniquifier::get_category(), EggGroupNode::get_connected_shading(), PandaFramework::get_mouse(), FactoryParams::get_param_of_type(), EggGroupNode::has_absolute_pathnames(), NodePath::has_clip_plane(), NodePath::has_clip_plane_off(), NodePath::has_light(), PandaFramework::hide_collision_solids(), x11GraphicsWindow::open_window(), eglGraphicsWindow::open_window(), EggNode::parse_egg(), CharacterMaker::part_to_node(), EggGroupNode::post_apply_flat_attribute(), EggBinner::prepare_node(), PortalClipper::prepare_portal(), NodePath::project_texture(), EggMatrixTablePointer::quantize_channels(), ParametricCurveCollection::r_add_curves(), SceneGraphReducer::r_collect_vertex_data(), EggGroupNode::r_load_externals(), EggGroupNode::rebuild_vertex_pools(), EggGroupNode::recompute_polygon_normals(), EggGroupNode::remove_invalid_primitives(), EggGroupNode::remove_unused_vertices(), EggLoader::reparent_decals(), EggMaterialCollection::replace_materials(), EggTextureCollection::replace_textures(), EggGroupNode::resolve_filenames(), EggGroupNode::reverse_vertex_ordering(), NodePath::set_clip_plane(), NodePath::set_clip_plane_off(), NodePath::set_light(), ProjectionScreen::set_projector(), NonlinearImager::set_source_camera(), EggXfmSAnim::set_value(), NonlinearImager::set_viewer_camera(), PandaFramework::show_collision_solids(), BamCache::store(), XFileToEggConverter::strip_nodes(), EggGroupNode::strip_normals(), DataGraphTraverser::traverse(), DataGraphTraverser::traverse_below(), EggGroupNode::triangulate_polygons(), EggGroupNode::unify_attributes(), EggNameUniquifier::uniquify(), NodeCullCallbackData::upcall(), PhysicsCollisionHandler::validate_target(), EggXfmSAnim::write(), EggGroup::write(), EggToDXFLayer::write_3d_face(), and EggToDXFLayer::write_entities().

void ReferenceCount::local_object ( ) [inline, inherited]

This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack.

This allows the object to be passed to functions that will increment and decrement the object's reference count temporarily, and it will prevent the object from being deleted (inappropriately), when the reference count returns to zero. It actually achieves this by setting a large positive value in the reference count field.

Definition at line 276 of file referenceCount.I.

Referenced by PGTop::cull_callback(), BoundingSphere::extend_by_hexahedron(), AsyncTaskManager::find_task(), AsyncTaskManager::find_tasks(), and AsyncTaskManager::find_tasks_matching().

void ReferenceCount::ref ( ) const [inline, inherited]

Explicitly increments the reference count.

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

Definition at line 179 of file referenceCount.I.

References ReferenceCount::test_ref_count_integrity().

Referenced by CachedTypedWritableReferenceCount::cache_ref(), TypedWritable::decode_raw_from_bam_stream(), NodeCachedReferenceCount::node_ref(), NodeReferenceCount::node_ref(), BamCacheRecord::set_data(), CullableObject::set_draw_callback(), and ModelRoot::set_reference().

void PhysxWheelShape::save_to_desc ( PhysxWheelShapeDesc shapeDesc) const

Saves the state of the shape object to a descriptor.

Definition at line 61 of file physxWheelShape.cxx.

void PhysxWheelShape::set_axle_speed ( float  speed)

Set the current axle rotation speed.

Note: WSF_axle_speed_override flag must be raised for this to have effect!

Definition at line 255 of file physxWheelShape.cxx.

void PhysxWheelShape::set_brake_torque ( float  torque)

Must be nonnegative.

Very large values should lock wheel but should be stable.

Definition at line 176 of file physxWheelShape.cxx.

void PhysxShape::set_flag ( const PhysxShapeFlag  flag,
bool  value 
) [inherited]

Sets the specified shape flag.

The shape may be turned into a trigger by setting one or more of the TriggerFlags to true. A trigger shape will not collide with other shapes. Instead, if a shape enters the trigger's volume, a trigger event will be sent. Trigger events can be listened to by DirectObjects. The following trigger events can be sent:

  • physx-trigger-enter
  • physx-trigger-stay
  • physx-trigger-leave

Definition at line 148 of file physxShape.cxx.

void PhysxShape::set_group ( unsigned short  group) [inherited]

Sets which collision group this shape is part of.

Default group is 0. Maximum possible group is 31. Collision groups are sets of shapes which may or may not be set to collision detect with each other; this can be set using PhysxScene::set_group_collision_flag().

Definition at line 208 of file physxShape.cxx.

void PhysxShape::set_groups_mask ( const PhysxGroupsMask mask) [inherited]

Sets 128-bit mask used for collision filtering.

Does NOT wake the associated actor up automatically.

Definition at line 355 of file physxShape.cxx.

void PhysxWheelShape::set_inverse_wheel_mass ( float  invMass)

Set the inverse mass of the wheel.

Determines the wheel velocity that wheel torques can achieve.

Definition at line 124 of file physxWheelShape.cxx.

void PhysxShape::set_local_mat ( const LMatrix4f mat) [inherited]

Set the transform of the shape in actor space, i.e.

relative to the actor it is owned by.

Calling this method does NOT wake the associated actor up automatically.

Calling this method does not automatically update the inertia properties of the owning actor (if applicable); use PhysxActor::update_mass_from_shapes() to do this.

Definition at line 282 of file physxShape.cxx.

References PhysxManager::mat4_to_nxMat34().

void PhysxShape::set_local_pos ( const LPoint3f pos) [inherited]

Set the position of the shape in actor space, i.e.

relative to the actor it is owned by.

Calling this method does NOT wake the associated actor up automatically.

Calling this method does not automatically update the inertia properties of the owning actor (if applicable); use PhysxActor::update_mass_from_shapes() to do this.

Definition at line 246 of file physxShape.cxx.

References PhysxManager::point3_to_nxVec3().

void PhysxShape::set_material ( const PhysxMaterial material) [inherited]

Assigns a material to the shape.

Definition at line 323 of file physxShape.cxx.

void PhysxShape::set_material_index ( unsigned short  index) [inherited]

Assigns a material index to the shape.

The material index can be retrieved by calling PhysxMaterial::get_material_index(). If the material index is invalid, it will still be recorded, but the default material (at index 0) will effectively be used for simulation.

Definition at line 341 of file physxShape.cxx.

void PhysxWheelShape::set_motor_torque ( float  torque)

Set the sum engine torque on the wheel axle.

Positive or negative depending on direction

Definition at line 150 of file physxWheelShape.cxx.

void PhysxShape::set_name ( const char *  name) [inherited]

Sets a name string for this object.

The name can be retrieved again with get_name(). This is for debugging and is not used by the physics engine.

Definition at line 111 of file physxShape.cxx.

void PhysxWheelShape::set_radius ( float  radius)

Sets the sphere radius.

Definition at line 73 of file physxWheelShape.cxx.

void PhysxShape::set_skin_width ( float  skinWidth) [inherited]

Sets the skin width.

The skin width must be non-negative.

Definition at line 175 of file physxShape.cxx.

void PhysxWheelShape::set_steer_angle ( float  angle)

Set the steering angle, around shape Y axis.

The steering angle is measured in degrees.

Definition at line 202 of file physxWheelShape.cxx.

void PhysxWheelShape::set_steer_angle_rad ( float  angle)

Set the steering angle, around shape Y axis.

The steering angle is measured in radians.

Definition at line 228 of file physxWheelShape.cxx.

void PhysxWheelShape::set_suspension ( const PhysxSpringDesc spring)

Set the data intended for car wheel suspension effects.

Definition at line 313 of file physxWheelShape.cxx.

void PhysxWheelShape::set_suspension_travel ( float  travel)

Set the maximum extension distance of suspension along shape's -Y axis.

The minimum extension is always 0.

Definition at line 99 of file physxWheelShape.cxx.

void PhysxWheelShape::set_wheel_flag ( PhysxWheelShapeFlag  flag,
bool  value 
)

Turns the specified wheel shape flag on or off.

Definition at line 279 of file physxWheelShape.cxx.

bool ReferenceCount::test_ref_count_integrity ( ) const [inline, inherited]
bool ReferenceCount::test_ref_count_nonzero ( ) const [inline, inherited]

Does some easy checks to make sure that the reference count isn't zero, or completely bogus.

Returns true if ok, false otherwise.

Definition at line 252 of file referenceCount.I.

References ReferenceCount::do_test_ref_count_nonzero().

Referenced by CopyOnWritePointer::test_ref_count_nonzero().

bool ReferenceCount::unref ( ) const [inline, virtual, inherited]

Explicitly decrements the reference count.

Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic.) However, see the helper function unref_delete().

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

The return value is true if the new reference count is nonzero, false if it is zero.

Reimplemented in GeomVertexArrayFormat, GeomVertexFormat, InternalName, RenderAttrib, RenderEffects, RenderState, and TransformState.

Definition at line 214 of file referenceCount.I.

References ReferenceCount::test_ref_count_integrity().

Referenced by CachedTypedWritableReferenceCount::cache_unref(), TypedWritable::decode_raw_from_bam_stream(), RenderEffect::finalize(), NodeCachedReferenceCount::node_unref(), NodeReferenceCount::node_unref(), TransformState::unref(), RenderState::unref(), RenderEffects::unref(), RenderAttrib::unref(), InternalName::unref(), GeomVertexFormat::unref(), and GeomVertexArrayFormat::unref().

void ReferenceCount::weak_ref ( WeakPointerToVoid ptv) [inline, inherited]

Adds the indicated PointerToVoid as a weak reference to this object.

Definition at line 321 of file referenceCount.I.

References WeakReferenceList::add_reference(), and ReferenceCount::get_weak_list().

void ReferenceCount::weak_unref ( WeakPointerToVoid ptv) [inline, inherited]

Removes the indicated PointerToVoid as a weak reference to this object.

It must have previously been added via a call to weak_ref().

Definition at line 334 of file referenceCount.I.

References WeakReferenceList::clear_reference(), and ReferenceCount::has_weak_list().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations