template<UnsignedInt dimensions>
Line class
Infinite line, defined by two points.
Contents
See Collision detection for brief introduction.
Derived classes
-
template<UnsignedInt dimensions>class LineSegment
- 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
- Constructor.
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
Enumerators | |
---|---|
Dimensions |
Dimension count |
Function documentation
template<UnsignedInt dimensions>
Magnum:: Shapes:: Line<dimensions>:: Line() constexpr
Default constructor.
Creates line with both points at origin.