struct geom::ConicalCapsule — HIRO 0.7.0 documentation

# struct geom::ConicalCapsule

## Overview

Definition of a 3 dimensional capsule with different radiuses at each end. More…

    #include <GeometryStructures.h>

    struct ConicalCapsule {
        // fields

        LineSegment3 central;
        float radius1 { 1.0f };
        float radius2 { 1.0f };

        // construction

        ConicalCapsule();
        ConicalCapsule(const LineSegment3& line_segment, float init_radius1, const float init_radius2);
        ConicalCapsule(const glm::vec3 point1, const float init_radius1, const glm::vec3 point2, const float init_radius2);

        // methods

        float GetInterpolatedRadius(float factor) const;
    };

## Detailed Documentation

Definition of a 3 dimensional capsule with different radiuses at each end.

### Fields

    LineSegment3 central

Central line of a capsule.

    float radius1 { 1.0f }

Distance of a capsule surface from the point1 of a central line.

    float radius2 { 1.0f }

Distance of a capsule surface from the point2 of a central line.

### Methods

    float GetInterpolatedRadius(float factor) const

Returns a radius in the specific central part of a capsule.

Parameters:

factor | Interpolation parameter over central. Value 0 returns radius1 and 1 returns radius2.