Panda3D

Loading...
Searching...
No Matches
physxWheelShapeDesc.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file physxWheelShapeDesc.h
10 * @author enn0x
11 * @date 2009-11-09
12 */
13
14#ifndef PHYSXWHEELSHAPEDESC_H
15#define PHYSXWHEELSHAPEDESC_H
16
17#include "pandabase.h"
18
19#include "physxShapeDesc.h"
20#include "physx_includes.h"
21
22 class PhysxSpringDesc;
23
24/**
25 * Descriptor class for PhysxWheelShape.
26 */
27 class EXPCL_PANDAPHYSX PhysxWheelShapeDesc : public PhysxShapeDesc {
28
29PUBLISHED:
30 INLINE PhysxWheelShapeDesc();
31 INLINE ~PhysxWheelShapeDesc();
32
33 void set_to_default();
34 INLINE bool is_valid() const;
35
36 void set_radius(float radius);
37 void set_suspension_travel(float suspensionTravel);
38 void set_inverse_wheel_mass(float inverseWheelMass);
39 void set_motor_torque(float motorTorque);
40 void set_brake_torque(float brakeTorque);
41 void set_steer_angle(float steerAngle);
42 void set_wheel_flag(PhysxWheelShapeFlag flag, bool value);
43 void set_suspension(const PhysxSpringDesc &spring);
44
45 float get_radius() const;
46 float get_suspension_travel() const;
47 float get_inverse_wheel_mass() const;
48 float get_motor_torque() const;
49 float get_brake_torque() const;
50 float get_steer_angle() const;
51 bool get_wheel_flag(PhysxWheelShapeFlag flag) const;
52 PhysxSpringDesc get_suspension() const;
53
54 public:
55 NxShapeDesc *ptr() const { return (NxShapeDesc *)&_desc; };
56 NxWheelShapeDesc _desc;
57};
58
59#include "physxWheelShapeDesc.I"
60
61#endif // PHYSXWHEELSHAPEDESC_H
PhysxSpringDesc
Describes a joint spring.
Definition physxSpringDesc.h:25
PhysxWheelShapeDesc::set_inverse_wheel_mass
void set_inverse_wheel_mass(float inverseWheelMass)
Set the inverse mass of the wheel.
Definition physxWheelShapeDesc.cxx:68
PhysxWheelShapeDesc::set_brake_torque
void set_brake_torque(float brakeTorque)
Set the amount of torque applied for braking.
Definition physxWheelShapeDesc.cxx:104
PhysxWheelShapeDesc::set_motor_torque
void set_motor_torque(float motorTorque)
Set the sum engine torque on the wheel axle.
Definition physxWheelShapeDesc.cxx:86
PhysxWheelShapeDesc::set_suspension_travel
void set_suspension_travel(float suspensionTravel)
Set the maximum extension distance of suspension along shape's -Y axis.
Definition physxWheelShapeDesc.cxx:50
PhysxWheelShapeDesc::get_radius
float get_radius() const
Radius of shape.
Definition physxWheelShapeDesc.cxx:41
PhysxWheelShapeDesc::set_suspension
void set_suspension(const PhysxSpringDesc &spring)
Set the data intended for car wheel suspension effects.
Definition physxWheelShapeDesc.cxx:164
PhysxWheelShapeDesc::get_wheel_flag
bool get_wheel_flag(PhysxWheelShapeFlag flag) const
Returns the specified wheel shape flag.
Definition physxWheelShapeDesc.cxx:155
PhysxWheelShapeDesc::set_radius
void set_radius(float radius)
Radius of shape.
Definition physxWheelShapeDesc.cxx:32
PhysxWheelShapeDesc::set_wheel_flag
void set_wheel_flag(PhysxWheelShapeFlag flag, bool value)
Turn the specified wheel shape flag on or off.
Definition physxWheelShapeDesc.cxx:141
PhysxWheelShapeDesc::set_steer_angle
void set_steer_angle(float steerAngle)
Set the steering angle, around shape Y axis.
Definition physxWheelShapeDesc.cxx:123
PhysxWheelShapeDesc::is_valid
bool is_valid() const
Returns true if the descriptor is valid.
Definition physxWheelShapeDesc.I:35
PhysxWheelShapeDesc::set_to_default
void set_to_default()
(re)sets the structure to the default.
Definition physxWheelShapeDesc.cxx:20
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxShapeDesc.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxWheelShapeDesc.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physx_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.