Panda3D
Loading...
Searching...
No Matches
physxControllerDesc.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 physxControllerDesc.h
10 * @author enn0x
11 * @date 2009-09-22
12 */
13
14#ifndef PHYSXCONTROLLERDESC_H
15#define PHYSXCONTROLLERDESC_H
16
17#include "pandabase.h"
18#include "luse.h"
19
20#include "physx_includes.h"
21
22/**
23 * Descriptor class for a character controller.
24 */
25class EXPCL_PANDAPHYSX PhysxControllerDesc {
26PUBLISHED:
27 virtual ~PhysxControllerDesc() {};
28
29 virtual void set_to_default() = 0;
30 virtual bool is_valid() const = 0;
31
32 void set_pos(const LPoint3f &pos);
33 void set_slope_limit(float slopeLimit);
34 void set_skin_width(float skinWidth);
35 void set_step_offset(float setpOffset);
36 void set_interaction_flag(bool interactionFlag);
37
38 LPoint3f get_pos() const;
39 float get_slope_limit() const;
40 float get_skin_width() const;
41 float get_step_offset() const;
42 bool get_interaction_flag() const;
43
44public:
45 virtual NxControllerDesc *ptr() const = 0;
46
47protected:
48 INLINE PhysxControllerDesc();
49};
50
51#include "physxControllerDesc.I"
52
53#endif // PHYSXCONTROLLERDESC_H
void set_step_offset(float setpOffset)
Defines the maximum height of an obstacle which the character can climb.
void set_skin_width(float skinWidth)
Sets the skin width used by the controller.
void set_pos(const LPoint3f &pos)
Set the position of the character.
bool get_interaction_flag() const
Returns the interaction flag.
float get_skin_width() const
Returns the skin width used by the controller.
void set_interaction_flag(bool interactionFlag)
The interaction flag controls if a character controller collides with other controllers.
float get_slope_limit() const
Returns the maximum slope which the character can walk up.
void set_slope_limit(float slopeLimit)
Sets the maximum slope which the character can walk up.
float get_step_offset() const
Returns the maximum height of an obstacle which the character can climb.
LPoint3f get_pos() const
Returns the position of the character.
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.