template<UnsignedInt dimensions>
Magnum::Shapes::Line class

Infinite line, defined by two points.

See Collision detection for brief introduction.

Derived classes

template<UnsignedInt dimensions>
class LineSegment deprecated
Line segment, defined by starting and ending point.

Public types

enum (anonymous): UnsignedInt { Dimensions = dimensions }

Constructors, destructors, conversion operators

Line() constexpr
Default constructor.
Line(const VectorTypeFor<dimensions, Float>& a, const typename DimensionTraits<dimensions, Float>::VectorType& b) constexpr

Public functions

auto transformed(const MatrixTypeFor<dimensions, Float>& matrix) const -> Line<dimensions>
Transformed shape.
auto a() const -> VectorTypeFor<dimensions, Float> constexpr
First point.
void setA(const VectorTypeFor<dimensions, Float>& a)
Set first point.
auto b() const -> VectorTypeFor<dimensions, Float> constexpr
Second point.
void setB(const VectorTypeFor<dimensions, Float>& b)
Set second point.

Enum documentation

template<UnsignedInt dimensions>
enum Magnum::Shapes::Line<dimensions>::(anonymous): UnsignedInt


Dimension count

Function documentation

template<UnsignedInt dimensions>
Magnum::Shapes::Line<dimensions>::Line() constexpr

Default constructor.

Creates line with both points at origin.

template<UnsignedInt dimensions>
bool operator%(const Line3D& a, const Plane& b)

Collision occurence of Line and Plane.

template<UnsignedInt dimensions> template<UnsignedInt dimensions>
bool operator%(const Line<dimensions>& a, const Sphere<dimensions>& b)

Collision occurence of Line and Sphere.