Panda3D
physxSegment.h
1 // Filename: physxSegment.h
2 // Created by: enn0x (31Oct09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PHYSXSEGMENT_H
16 #define PHYSXSEGMENT_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 
21 #include "config_physx.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : PhysxSegment
25 // Description : Represents a line segment.
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_PANDAPHYSX PhysxSegment {
28 
29 PUBLISHED:
30  INLINE PhysxSegment();
31  INLINE PhysxSegment(const PhysxSegment & segment);
32  PhysxSegment(const LPoint3f &p0, const LPoint3f &p1);
33  INLINE ~PhysxSegment();
34 
35  void compute_direction(LPoint3f &dir) const;
36  float compute_length() const;
37  void compute_point(LPoint3f &p, float t) const;
38  float compute_square_length() const;
39  LPoint3f get_origin() const;
40  void set_origin_direction(const LPoint3f &origin, const LVector3f &direction);
41 
42  LPoint3f get_p0() const;
43  LPoint3f get_p1() const;
44 
45  void set_p0(LPoint3f p);
46  void set_p1(LPoint3f p);
47 
48 public:
49  NxSegment _segment;
50 };
51 
52 #include "physxSegment.I"
53 
54 #endif // PHYSSEGMENT_H
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
Represents a line segment.
Definition: physxSegment.h:27