Panda3D
Loading...
Searching...
No Matches
physxActorDesc.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 physxActorDesc.h
10 * @author enn0x
11 * @date 2009-09-05
12 */
13
14#ifndef PHYSXACTORDESC_H
15#define PHYSXACTORDESC_H
16
17#include "pandabase.h"
18#include "luse.h"
19
20#include "physx_includes.h"
21
22class PhysxBodyDesc;
23class PhysxShapeDesc;
24
25/**
26 * Descriptor for PhysxActor.
27 */
28class EXPCL_PANDAPHYSX PhysxActorDesc {
29
30PUBLISHED:
31 INLINE PhysxActorDesc();
32 INLINE ~PhysxActorDesc();
33
34 INLINE void set_to_default();
35 INLINE bool is_valid() const;
36
37 void add_shape(PhysxShapeDesc &desc);
38
39 void set_name(const char *name);
40 void set_density(float density);
41 void set_global_pos(const LPoint3f &pos);
42 void set_global_mat(const LMatrix4f &mat);
43 void set_global_hpr(float h, float p, float r);
44 void set_body(PhysxBodyDesc &desc);
45
46 const char *get_name() const;
47 float get_density() const;
48 LPoint3f get_global_pos() const;
49 LMatrix4f get_global_mat() const;
50 PhysxBodyDesc get_body() const;
51
52public:
53 NxActorDesc _desc;
54
55private:
56 std::string _name;
57};
58
59#include "physxActorDesc.I"
60
61#endif // PHYSXACTORDESC_H
LMatrix4f get_global_mat() const
Returns the actor's transform in global space.
void set_density(float density)
Set the density used during mass/intertia computation.
void set_body(PhysxBodyDesc &desc)
Sets the body descriptor for this actor.
void set_global_mat(const LMatrix4f &mat)
Set the position and orientation of the actor in global space.
void set_name(const char *name)
Sets the optional debug name for the actor.
LPoint3f get_global_pos() const
Returns the actor's position in global space.
bool is_valid() const
Returns true if the descriptor is valid.
const char * get_name() const
Returns the optional debug name for this actor.
void set_global_pos(const LPoint3f &pos)
Set the position of the actor in global space.
float get_density() const
Returns the actor's density.
void set_to_default()
(re)sets the structure to the default.
PhysxBodyDesc get_body() const
Gets the body descriptor for this actor.
void add_shape(PhysxShapeDesc &desc)
Adds a shape to the list of collision shapes composing this actor.
void set_global_hpr(float h, float p, float r)
Sets the orientation of the actor in global space by providing angles for heading,...
Descriptor for the optional rigid body dynamic state of PhysxActor.
Abstract base class for shape descriptors.
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.