Public Member Functions | Public Attributes | Static Public Attributes | List of all members
shapes::Cone Class Reference

Definition of a cone Tip is on positive z axis. Center of base is on negative z axis. Origin is halway between tip and center of base. More...

#include <shapes.h>

Inheritance diagram for shapes::Cone:
Inheritance graph
[legend]

Public Member Functions

Coneclone () const override
 Create a copy of this shape. More...
 
 Cone ()
 
 Cone (double r, double l)
 
void padd (double padding)
 Add uniform padding to this shape. More...
 
void padd (double paddRadius, double paddLength)
 Add non-uniform padding to this shape. More...
 
void print (std::ostream &out=std::cout) const override
 Print information about this shape. More...
 
void scale (double scale)
 Uniformly scale this shape by a factor. More...
 
void scale (double scaleRadius, double scaleLength)
 Scale this shape by a non-uniform factor. More...
 
void scaleAndPadd (double scale, double padd) override
 Uniformly scale and padd this shape. More...
 
void scaleAndPadd (double scaleRadius, double scaleLength, double paddRadius, double paddLength)
 Scale this shape by a non-uniform factor and then add non-uniform padding. More...
 
- Public Member Functions inherited from shapes::Shape
virtual bool isFixed () const
 Return a flag indicating whether this shape can be scaled and/or padded. More...
 
void padd (double padding)
 Add uniform padding to this shape. More...
 
void scale (double scale)
 Uniformly scale this shape by a factor. More...
 
 Shape ()
 
virtual ~Shape ()
 

Public Attributes

double length
 The length (height) of the cone. More...
 
double radius
 The radius of the cone. More...
 
- Public Attributes inherited from shapes::Shape
ShapeType type
 The type of the shape. More...
 

Static Public Attributes

static const std::string STRING_NAME = "cone"
 The type of the shape, as a string. More...
 

Detailed Description

Definition of a cone Tip is on positive z axis. Center of base is on negative z axis. Origin is halway between tip and center of base.

Definition at line 178 of file shapes.h.

Constructor & Destructor Documentation

◆ Cone() [1/2]

shapes::Cone::Cone ( )

Definition at line 157 of file shapes.cpp.

◆ Cone() [2/2]

shapes::Cone::Cone ( double  r,
double  l 
)

Definition at line 163 of file shapes.cpp.

Member Function Documentation

◆ clone()

Cone * shapes::Cone::clone ( ) const
overridevirtual

Create a copy of this shape.

Implements shapes::Shape.

Definition at line 257 of file shapes.cpp.

◆ padd() [1/2]

void shapes::Shape::padd

Add uniform padding to this shape.

Definition at line 320 of file shapes.cpp.

◆ padd() [2/2]

void shapes::Cone::padd ( double  paddRadius,
double  paddLength 
)

Add non-uniform padding to this shape.

Parameters
paddRadiusRadius padding (in meters).
paddLengthCone length padding (in meters).

Definition at line 373 of file shapes.cpp.

◆ print()

void shapes::Cone::print ( std::ostream &  out = std::cout) const
overridevirtual

Print information about this shape.

Reimplemented from shapes::Shape.

Definition at line 476 of file shapes.cpp.

◆ scale() [1/2]

void shapes::Shape::scale

Uniformly scale this shape by a factor.

Definition at line 315 of file shapes.cpp.

◆ scale() [2/2]

void shapes::Cone::scale ( double  scaleRadius,
double  scaleLength 
)

Scale this shape by a non-uniform factor.

Parameters
scaleRadiusRadius scaling factor.
scaleLengthCone length scaling factor.

Definition at line 368 of file shapes.cpp.

◆ scaleAndPadd() [1/2]

void shapes::Cone::scaleAndPadd ( double  scale,
double  padd 
)
overridevirtual

Uniformly scale and padd this shape.

Implements shapes::Shape.

Definition at line 378 of file shapes.cpp.

◆ scaleAndPadd() [2/2]

void shapes::Cone::scaleAndPadd ( double  scaleRadius,
double  scaleLength,
double  paddRadius,
double  paddLength 
)

Scale this shape by a non-uniform factor and then add non-uniform padding.

Parameters
scaleRadiusRadius scaling factor.
scaleLengthCone length scaling factor.
paddRadiusRadius padding (in meters).
paddLengthCone length padding (in meters).

Definition at line 358 of file shapes.cpp.

Member Data Documentation

◆ length

double shapes::Cone::length

The length (height) of the cone.

Definition at line 218 of file shapes.h.

◆ radius

double shapes::Cone::radius

The radius of the cone.

Definition at line 221 of file shapes.h.

◆ STRING_NAME

const std::string shapes::Cone::STRING_NAME = "cone"
static

The type of the shape, as a string.

Definition at line 188 of file shapes.h.


The documentation for this class was generated from the following files:


geometric_shapes
Author(s): Ioan Sucan , Gil Jones
autogenerated on Tue Aug 13 2024 02:40:57