template<UnsignedInt dimensions>
Cylinder class
Infinite cylinder defined by line and radius.
Contents
Unlike other elements the cylinder expects uniform scaling. See Collision detection for brief introduction.
Public types
- enum (anonymous): UnsignedInt { Dimensions = dimensions }
Constructors, destructors, conversion operators
- Cylinder() constexpr
- Constructor.
- Cylinder(const VectorTypeFor<dimensions, Float>& a, const VectorTypeFor<dimensions, Float>& b, Float radius) constexpr
- Constructor.
Public functions
- auto transformed(const MatrixTypeFor<dimensions, Float>& matrix) const -> Cylinder<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.
- auto radius() const -> Float constexpr
- Radius.
- void setRadius(Float radius)
- Set radius.
- auto operator%(const Point<dimensions>& other) const -> bool
- Collision occurence with point.
- auto operator%(const Sphere<dimensions>& other) const -> bool
- Collision occurence with sphere.
Enum documentation
template<UnsignedInt dimensions>
enum Magnum:: Shapes:: Cylinder<dimensions>:: (anonymous): UnsignedInt
Enumerators | |
---|---|
Dimensions |
Dimension count |
Function documentation
template<UnsignedInt dimensions>
Magnum:: Shapes:: Cylinder<dimensions>:: Cylinder() constexpr
Constructor.
Creates zero-sized cylinder at origin.