Gin
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Point< T > Class Template Reference

A lightweight 2D point class for projects that don't use juce_graphics. More...

#include <gin_point.h>

Public Member Functions

 Point ()=default
 Creates a point at the origin (0, 0).
 
 Point (T x_, T y_)
 Creates a point with the specified coordinates.
 
getX ()
 Returns the x coordinate.
 
getY ()
 Returns the y coordinate.
 

Public Attributes

x = T (0)
 The x coordinate.
 
y = T (0)
 The y coordinate.
 

Detailed Description

template<typename T>
class Point< T >

A lightweight 2D point class for projects that don't use juce_graphics.

This class provides a simple coordinate pair with optional conversion to/from juce::Point when juce_graphics is available. It's useful for modules that need basic point functionality without depending on the full graphics module.

See also
getX, getY, toJuce

Constructor & Destructor Documentation

◆ Point() [1/2]

template<typename T >
Point< T >::Point ( )
default

◆ Point() [2/2]

template<typename T >
Point< T >::Point ( x_,
y_ 
)

Creates a point with the specified coordinates.

Parameters
x_The x coordinate
y_The y coordinate

References Point< T >::Point(), Point< T >::x, and Point< T >::y.

Member Function Documentation

◆ getX()

template<typename T >
T Point< T >::getX ( )

◆ getY()

template<typename T >
T Point< T >::getY ( )

Member Data Documentation

◆ x

template<typename T >
T Point< T >::x = T (0)

◆ y

template<typename T >
T Point< T >::y = T (0)

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