Gin
Public Member Functions | Public Attributes | List of all members
Ellipse< T > Class Template Reference

Equations to calculate the shape of an ellipse and to calculate points on the edge of the ellipse and to see if points are inside or outside. More...

Public Member Functions

 Ellipse (T x_, T y_, T a_, T b_)
 Creates a ellipse with a given centre and width / height. More...
 
 Ellipse (T a_, T b_)
 Creates a ellipse with centred at (0,0) with a width and height. More...
 
bool isPointOn (Point< T > pt, T accuracy=0.00001)
 
bool isPointOutside (Point< T > pt)
 
bool isPointInside (Point< T > pt)
 
Point< T > pointAtAngle (T angle)
 
juce::Array< Point< T > > findIntersections (Point< T > p1, Point< T > p2)
 

Public Attributes

x = 0
 
y = 0
 
a = 0
 
b = 0
 

Detailed Description

template<typename T>
class Ellipse< T >

Equations to calculate the shape of an ellipse and to calculate points on the edge of the ellipse and to see if points are inside or outside.

Constructor & Destructor Documentation

◆ Ellipse() [1/2]

template<typename T >
Ellipse< T >::Ellipse ( x_,
y_,
a_,
b_ 
)

Creates a ellipse with a given centre and width / height.

◆ Ellipse() [2/2]

template<typename T >
Ellipse< T >::Ellipse ( a_,
b_ 
)

Creates a ellipse with centred at (0,0) with a width and height.

Member Function Documentation

◆ isPointOn()

template<typename T >
bool Ellipse< T >::isPointOn ( Point< T >  pt,
accuracy = 0.00001 
)

◆ isPointOutside()

template<typename T >
bool Ellipse< T >::isPointOutside ( Point< T >  pt)

◆ isPointInside()

template<typename T >
bool Ellipse< T >::isPointInside ( Point< T >  pt)

◆ pointAtAngle()

template<typename T >
Point<T> Ellipse< T >::pointAtAngle ( angle)

◆ findIntersections()

template<typename T >
juce::Array<Point<T> > Ellipse< T >::findIntersections ( Point< T >  p1,
Point< T >  p2 
)

Member Data Documentation

◆ x

template<typename T >
T Ellipse< T >::x = 0

◆ y

template<typename T >
T Ellipse< T >::y = 0

◆ a

template<typename T >
T Ellipse< T >::a = 0

◆ b

template<typename T >
T Ellipse< T >::b = 0

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