Panda3D
Loading...
Searching...
No Matches
physxRay.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 physxRay.h
10 * @author enn0x
11 * @date 2009-10-21
12 */
13
14#ifndef PHYSXRAY_H
15#define PHYSXRAY_H
16
17#include "pandabase.h"
18#include "luse.h"
19
20#include "config_physx.h"
21
22/**
23 * Represents an ray as an origin and direction. The ray will be infinite if
24 * no length is given.
25 */
26class EXPCL_PANDAPHYSX PhysxRay {
27
28PUBLISHED:
29 INLINE PhysxRay();
30 INLINE ~PhysxRay();
31
32 void set_length(float length);
33 void set_origin(const LPoint3f &origin);
34 void set_direction(const LVector3f &direction);
35
36 float get_length() const;
37 LPoint3f get_origin() const;
38 LVector3f get_direction() const;
39
40public:
41 NxRay _ray;
42 NxReal _length;
43};
44
45#include "physxRay.I"
46
47#endif // PHYSRAY_H
void set_origin(const LPoint3f &origin)
Sets the ray origin.
Definition physxRay.cxx:21
void set_length(float length)
Sets the ray length.
Definition physxRay.cxx:63
LPoint3f get_origin() const
Returns the ray origin.
Definition physxRay.cxx:31
LVector3f get_direction() const
Returns the ray direction.
Definition physxRay.cxx:52
float get_length() const
Returns the ray length.
Definition physxRay.cxx:73
void set_direction(const LVector3f &direction)
Set the ray direction.
Definition physxRay.cxx:40
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.