Core 1.0
HemiSphereDisc Class Reference

Hemisphere-disk. More...

#include <hemispheredisc.h>

Inheritance diagram for HemiSphereDisc:
Circle

Public Member Functions

 HemiSphereDisc (const Vector &, const Vector &, const double &, const double &)
 Create a hemi-sphere disc.
 
 ~HemiSphereDisc ()
 Empty.
 
Vector Normal (const Vector &) const
 Computes the distance vector between the skeleton and a given point in space.
 
double R (const Vector &) const
 Computes the squared distance to the object.
 
double Signed (const Vector &) const
 Compute the Euclidean signed distance between the object and a point.
 
Box GetBox () const
 Compute the axis aligned bounding box.
 
Vector Center () const
 Gets the center of a circle.
 

Protected Attributes

double s = 1.0
 Disc radius.
 
- Protected Attributes inherited from Circle
Vector c = Vector::Null
 Center of the circle.
 
Vector axis = Vector::Z
 Axis.
 
double r = 1.0
 Radius.
 

Friends

std::ostream & operator<< (std::ostream &s, const HemiSphereDisc &hemispheredisc)
 Overloaded output-stream operator.
 

Additional Inherited Members

- Protected Member Functions inherited from Circle
 Circle ()
 Empty.
 
 Circle (const double &)
 Creates a circle.
 
 Circle (const Vector &, const Vector &, const double &)
 Creates a circle.
 
 Circle (const Vector &, const Vector &, const Vector &)
 Creates a circle given three vertices.
 
 ~Circle ()
 Empty.
 
bool Intersect (const Ray &, double &) const
 Compute the ray-disc intersection.
 
Vector Center () const
 Gets the center of a circle.
 
Vector Axis () const
 Axis of the circle.
 
double Radius () const
 Radius of the circle.
 
double R (const Vector &) const
 Compute the distance between a point and a circle.
 
Vector Normal (const Vector &) const
 Computes the distance vector between a circle and a point.
 
void Rotate (const Matrix &)
 Rotates a circle.
 
void Translate (const Vector &)
 Translates a circle.
 
void Scale (const double &)
 Uniformly scales a circle.
 
Box GetBox () const
 Compute the axis aligned bounding box of a circle.
 
double Area () const
 Area of a circle.
 
Vector RandomInside (Random &=Random::R239) const
 Generate a random vector inside the circle.
 
Vector RandomOn (Random &=Random::R239) const
 Generate a random vector on the circle.
 
Vector Vogel (int, int) const
 Generate a spiraling vector in the disc.
 
- Static Protected Member Functions inherited from Circle
static double Area (const double &)
 Area of a circle given its radius.
 
- Static Protected Attributes inherited from Circle
static constexpr const double epsilon = 1.0e-10
 Internal epsilon constant.
 

Detailed Description

Hemisphere-disk.

This shape is defined as the Minkowski sum between a hemisphere and a disc.

Constructor & Destructor Documentation

◆ HemiSphereDisc()

HemiSphereDisc::HemiSphereDisc ( const Vector & c,
const Vector & a,
const double & r,
const double & s )
explicit

Create a hemi-sphere disc.

Parameters
cCenter.
aAxis (will be normalized internally).
rRadius of the disc.
sRadius of the half sphere.

Member Function Documentation

◆ Normal()

Vector HemiSphereDisc::Normal ( const Vector & p) const

Computes the distance vector between the skeleton and a given point in space.

Parameters
pPoint.

◆ R()

double HemiSphereDisc::R ( const Vector & p) const

Computes the squared distance to the object.

Parameters
pPoint.

◆ Signed()

double HemiSphereDisc::Signed ( const Vector & p) const

Compute the Euclidean signed distance between the object and a point.

Parameters
pPoint.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & s,
const HemiSphereDisc & hemispheredisc )
friend

Overloaded output-stream operator.

Parameters
sStream.
hemispherediscThe hemisphere disc.