Panda3D

Loading...
Searching...
No Matches
physxSegment.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 physxSegment.h
10 * @author enn0x
11 * @date 2009-10-31
12 */
13
14#ifndef PHYSXSEGMENT_H
15#define PHYSXSEGMENT_H
16
17#include "pandabase.h"
18#include "luse.h"
19
20#include "config_physx.h"
21
22/**
23 * Represents a line segment.
24 */
25 class EXPCL_PANDAPHYSX PhysxSegment {
26
27PUBLISHED:
28 INLINE PhysxSegment();
29 INLINE PhysxSegment(const PhysxSegment & segment);
30 PhysxSegment(const LPoint3f &p0, const LPoint3f &p1);
31 INLINE ~PhysxSegment();
32
33 void compute_direction(LPoint3f &dir) const;
34 float compute_length() const;
35 void compute_point(LPoint3f &p, float t) const;
36 float compute_square_length() const;
37 LPoint3f get_origin() const;
38 void set_origin_direction(const LPoint3f &origin, const LVector3f &direction);
39
40 LPoint3f get_p0() const;
41 LPoint3f get_p1() const;
42
43 void set_p0(LPoint3f p);
44 void set_p1(LPoint3f p);
45
46 public:
47 NxSegment _segment;
48};
49
50#include "physxSegment.I"
51
52#endif // PHYSSEGMENT_H
PhysxSegment::compute_point
void compute_point(LPoint3f &p, float t) const
Computes a point on the segment.
Definition physxSegment.cxx:103
PhysxSegment::set_origin_direction
void set_origin_direction(const LPoint3f &origin, const LVector3f &direction)
Setup this segment from origin (start point) and direction vector.
Definition physxSegment.cxx:126
PhysxSegment::compute_direction
void compute_direction(LPoint3f &dir) const
Returns the direction vector from the segment's start point to it's end point.
Definition physxSegment.cxx:81
PhysxSegment::compute_length
float compute_length() const
Returns the distance from the segment's start point to it's end point.
Definition physxSegment.cxx:94
PhysxSegment::set_p1
void set_p1(LPoint3f p)
Sets the end point of the segment.
Definition physxSegment.cxx:60
PhysxSegment::get_origin
LPoint3f get_origin() const
Returns the start point of the segment.
Definition physxSegment.cxx:71
PhysxSegment::set_p0
void set_p0(LPoint3f p)
Sets the start point of the segment.
Definition physxSegment.cxx:40
PhysxSegment::get_p1
LPoint3f get_p1() const
Returns the end point of the segment.
Definition physxSegment.cxx:51
PhysxSegment::get_p0
LPoint3f get_p0() const
Returns the start point of the segment.
Definition physxSegment.cxx:31
PhysxSegment::compute_square_length
float compute_square_length() const
Returns the square distance from the segment's start point to it's end point.
Definition physxSegment.cxx:117
config_physx.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
luse.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxSegment.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.