8#ifndef IMPALGEBRA_CONE_3D_H
9#define IMPALGEBRA_CONE_3D_H
19#include <cereal/access.hpp>
23IMPALGEBRA_BEGIN_NAMESPACE
32class IMPALGEBRAEXPORT Cone3D :
public GeometricPrimitiveD<3> {
43 double get_height()
const {
return seg_.get_length(); }
46 double get_angle()
const {
return 2. * std::atan(radius_ / get_height()); }
61 friend class cereal::access;
63 template<
class Archive>
void serialize(Archive &ar) {
72IMPALGEBRA_END_NAMESPACE
Base class for geometric types.
Simple implementation of segments in 3D.
Simple 3D sphere patch class.
Various useful constants.
#define IMP_NOT_IMPLEMENTED
Use this to mark that the method is not implemented yet.
Vector3D get_direction() const
Get the direction of the axis of the cone.
Cone3D(const Segment3D &s, double radius)
Make with top at s.get_point(0), base at s.get_point(1) with given radius.
Plane3D get_base_plane() const
Get the plane supporting the base of the cone.
Vector3D get_tip() const
Get the vertex of the cone.
bool get_contains(const Vector3D &v) const
Return True iff the given point is inside the volume.
double get_radius() const
Get the radius of the base circle.
Simple implementation of segments in 3D.
#define IMP_VOLUME_GEOMETRY_METHODS(Name, name, area, volume, bounding_box)
Implement the needed namespace methods for a geometry type.
Macros to help with objects that can be printed to a stream.
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
Macros to control compiler warnings.
#define IMP_UNUSED(variable)