Panda3D
 All Classes Functions Variables Enumerations
physxSegment.h
00001 // Filename: physxSegment.h
00002 // Created by:  enn0x (31Oct09)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef PHYSXSEGMENT_H
00016 #define PHYSXSEGMENT_H
00017 
00018 #include "pandabase.h"
00019 #include "luse.h"
00020 
00021 #include "config_physx.h"
00022 
00023 ////////////////////////////////////////////////////////////////////
00024 //       Class : PhysxSegment
00025 // Description : Represents a line segment.
00026 ////////////////////////////////////////////////////////////////////
00027 class EXPCL_PANDAPHYSX PhysxSegment {
00028 
00029 PUBLISHED:
00030   INLINE PhysxSegment();
00031   INLINE PhysxSegment(const PhysxSegment & segment);
00032   PhysxSegment(const LPoint3f &p0, const LPoint3f &p1);
00033   INLINE ~PhysxSegment();
00034 
00035   void compute_direction(LPoint3f &dir) const;
00036   float compute_length() const;
00037   void compute_point(LPoint3f &p, float t) const;
00038   float compute_square_length() const;
00039   LPoint3f get_origin() const;
00040   void set_origin_direction(const LPoint3f &origin, const LVector3f &direction);
00041 
00042   LPoint3f get_p0() const;
00043   LPoint3f get_p1() const;
00044 
00045   void set_p0(LPoint3f p);
00046   void set_p1(LPoint3f p);
00047 
00048 public:
00049   NxSegment _segment;
00050 };
00051 
00052 #include "physxSegment.I"
00053 
00054 #endif // PHYSSEGMENT_H
 All Classes Functions Variables Enumerations