## class SG_EXPORT osg::LineSegment

> LineSegment class for representing a line segment

## Inheritance:

### Public Methods

LineSegment()
LineSegment(const LineSegment& seg)
LineSegment(const Vec3& s, const Vec3& e)
LineSegment& operator = (const LineSegment& seg)
inline void set(const Vec3& s, const Vec3& e)
inline Vec3& start()
inline const Vec3& start() const
inline Vec3& end()
inline const Vec3& end() const
inline bool valid() const
bool intersect(const BoundingBox& bb) const
  return true if segment intersects BoundingBox
bool intersect(const BoundingBox& bb, float& r1, float& r2) const
  return true if segment intersects BoundingBox and return the intersection ratio's
bool intersect(const BoundingSphere& bs) const
  return true if segment intersects BoundingSphere
bool intersect(const BoundingSphere& bs, float& r1, float& r2) const
  return true if segment intersects BoundingSphere and return the intersection ratio's
bool intersect(const Vec3& v1, const Vec3& v2, const Vec3& v3, float& r)
  return true if segment intersects triangle and set ratio long segment.
inline void mult(const LineSegment& seg, const Matrix& m)
  post multiply a segment by matrix
inline void mult(const Matrix& m, const LineSegment& seg)
  pre multiply a segment by matrix

### Protected Fields

Vec3 _s
Vec3 _e

### Protected Methods

virtual ~LineSegment()
static bool intersectAndClip(Vec3& s, Vec3& e, const BoundingBox& bb)

### Inherited from Referenced:

### Public Methods

static void setDeleteHandler(DeleteHandler* handler)
static DeleteHandler* getDeleteHandler()
inline void ref() const
inline void unref_nodelete() const
inline int referenceCount() const
inline void unref() const

### Protected Fields

mutable int _refCount

## Documentation

> LineSegment class for representing a line segment

`LineSegment()`

`LineSegment(const LineSegment& seg)`

`LineSegment(const Vec3& s, const Vec3& e)`

`LineSegment& operator = (const LineSegment& seg)`

`inline void set(const Vec3& s, const Vec3& e)`

`inline Vec3& start()`

`inline const Vec3& start() const`

`inline Vec3& end()`

`inline const Vec3& end() const`

`inline bool valid() const`

`bool intersect(const BoundingBox& bb) const`
  return true if segment intersects BoundingBox

`bool intersect(const BoundingBox& bb, float& r1, float& r2) const`
  return true if segment intersects BoundingBox and return the intersection ratio's

`bool intersect(const BoundingSphere& bs) const`
  return true if segment intersects BoundingSphere

`bool intersect(const BoundingSphere& bs, float& r1, float& r2) const`
  return true if segment intersects BoundingSphere and return the intersection ratio's

`bool intersect(const Vec3& v1, const Vec3& v2, const Vec3& v3, float& r)`
  return true if segment intersects triangle and set ratio long segment.

`inline void mult(const LineSegment& seg, const Matrix& m)`
  post multiply a segment by matrix

`inline void mult(const Matrix& m, const LineSegment& seg)`
  pre multiply a segment by matrix

`virtual ~LineSegment()`

`static bool intersectAndClip(Vec3& s, Vec3& e, const BoundingBox& bb)`

`Vec3 _s`

`Vec3 _e`

This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java

This page was generated with the help of DOC++.