Hoops Visualize HPS  version 2018-SP2
Hoops Visualize HPS 3D Rendering Engine
Looking for a senior C++ dev?
I'm looking for work. Hire me!
HPS::ShapeCoordinate Class Reference

The ShapeCoordinate class is a coordinate used in shape definitions. More...

#include <hps.h>

Collaboration diagram for HPS::ShapeCoordinate:

Public Member Functions

 ShapeCoordinate ()
 Default constructor. More...
 
 ShapeCoordinate (float in_x, float in_y)
 Construct a new ShapeCoordinate from an (x, y) pair. More...
 
 ShapeCoordinate (float in_x, float in_y, FloatArray const &in_margins)
 Construct a new ShapeCoordinate from an (x, y) pair and up to four margins values. More...
 
 ShapeCoordinate (float in_x, float in_y, size_t in_count, float const in_margins [])
 Construct a new ShapeCoordinate from an (x, y) pair and up to four margins values. More...
 
 ShapeCoordinate (float in_x, float in_y, float in_radius)
 Construct a new ShapeCoordinate from an (x, y, radius) tuple. More...
 
 ShapeCoordinate (float in_x, float in_y, float in_radius, FloatArray const &in_margins)
 Construct a new ShapeCoordinate from an (x, y, radius) tuple and up to four margin values. More...
 
 ShapeCoordinate (float in_x, float in_y, float in_radius, size_t in_count, float const in_margins [])
 Construct a new ShapeCoordinate from an (x, y, radius) tuple and up to four margin values. More...
 
bool Equals (ShapeCoordinate const &in_that) const
 This function is used to check an object for equivalence to this. More...
 
bool operator== (ShapeCoordinate const &in_that) const
 This function is used to check an object for equivalence to this. More...
 
bool operator!= (ShapeCoordinate const &in_that) const
 This function is used to check an object for equivalence to this. More...
 
ShapeCoordinateSetMargins (float in_margin_one, float in_margin_two=0.0f, float in_margin_three=0.0f, float in_margin_four=0.0f)
 Sets the margins for this ShapeCoordinate. More...
 
bool ShowMargins (FloatArray &out_margins) const
 Shows the margins for this ShapeCoordinate. More...
 
ShapeCoordinateUnsetMargins ()
 Removes the margins for this ShapeCoordinate. More...
 

Public Attributes

float x
 
float y
 
float radius
 
FloatArray margins
 

Detailed Description

The ShapeCoordinate class is a coordinate used in shape definitions.

Two ShapeCoordinates can be used together to define a ShapePoint It is a 2d parametric coordinate.

Constructor & Destructor Documentation

◆ ShapeCoordinate() [1/7]

HPS::ShapeCoordinate::ShapeCoordinate ( )

Default constructor.

◆ ShapeCoordinate() [2/7]

HPS::ShapeCoordinate::ShapeCoordinate ( float  in_x,
float  in_y 
)

Construct a new ShapeCoordinate from an (x, y) pair.

Parameters
in_xA normalized distance over the horizontal text bounds.
in_yA normalized distance over the vertical text bounds.

◆ ShapeCoordinate() [3/7]

HPS::ShapeCoordinate::ShapeCoordinate ( float  in_x,
float  in_y,
FloatArray const &  in_margins 
)

Construct a new ShapeCoordinate from an (x, y) pair and up to four margins values.

Parameters
in_xA normalized distance over the horizontal text bounds.
in_yA normalized distance over the vertical text bounds.
in_marginsA series of up to four distances, normalized over the respective text margins.

◆ ShapeCoordinate() [4/7]

HPS::ShapeCoordinate::ShapeCoordinate ( float  in_x,
float  in_y,
size_t  in_count,
float const  in_margins[] 
)

Construct a new ShapeCoordinate from an (x, y) pair and up to four margins values.

Parameters
in_xA normalized distance over the horizontal text bounds.
in_yA normalized distance over the vertical text bounds.
in_sizeThe size of in_margins.
in_marginsA series of up to four distances, normalized over the respective text margins.

◆ ShapeCoordinate() [5/7]

HPS::ShapeCoordinate::ShapeCoordinate ( float  in_x,
float  in_y,
float  in_radius 
)

Construct a new ShapeCoordinate from an (x, y, radius) tuple.

Parameters
in_xA normalized distance over the horizontal text bounds.
in_yA normalized distance over the vertical text bounds.
in_radiusA normalized distance over the radius of the circle circumscribing the text bounds.

◆ ShapeCoordinate() [6/7]

HPS::ShapeCoordinate::ShapeCoordinate ( float  in_x,
float  in_y,
float  in_radius,
FloatArray const &  in_margins 
)

Construct a new ShapeCoordinate from an (x, y, radius) tuple and up to four margin values.

Parameters
in_xA normalized distance over the horizontal text bounds.
in_yA normalized distance over the vertical text bounds.
in_radiusA normalized distance over the radius of the circle circumscribing the text bounds.
in_marginsA series of up to four distances, normalized over the respective text margins.

◆ ShapeCoordinate() [7/7]

HPS::ShapeCoordinate::ShapeCoordinate ( float  in_x,
float  in_y,
float  in_radius,
size_t  in_count,
float const  in_margins[] 
)

Construct a new ShapeCoordinate from an (x, y, radius) tuple and up to four margin values.

Parameters
in_xA normalized distance over the horizontal text bounds.
in_yA normalized distance over the vertical text bounds.
in_radiusA normalized distance over the radius of the circle circumscribing the text bounds.
in_countThe size of in_margins.
in_marginsA series of up to four distances, normalized over the respective text margins.

Member Function Documentation

◆ Equals()

bool HPS::ShapeCoordinate::Equals ( ShapeCoordinate const &  in_that) const

This function is used to check an object for equivalence to this.

Parameters
in_thatThe object to compare to this.
Returns
true if the objects are equivalent, false otherwise.

◆ operator!=()

bool HPS::ShapeCoordinate::operator!= ( ShapeCoordinate const &  in_that) const
inline

This function is used to check an object for equivalence to this.

Parameters
in_thatThe object to compare to this.
Returns
true if the objects are not equivalent, false otherwise.

◆ operator==()

bool HPS::ShapeCoordinate::operator== ( ShapeCoordinate const &  in_that) const
inline

This function is used to check an object for equivalence to this.

Parameters
in_thatThe object to compare to this.
Returns
true if the objects are equivalent, false otherwise.

◆ SetMargins()

ShapeCoordinate& HPS::ShapeCoordinate::SetMargins ( float  in_margin_one,
float  in_margin_two = 0.0f,
float  in_margin_three = 0.0f,
float  in_margin_four = 0.0f 
)

Sets the margins for this ShapeCoordinate.

Parameters
in_margin_oneThe first margin value.
in_margin_twoThe second margin value.
in_margin_threeThe third margin value.
in_margin_fourThe fourth margin value.
Returns
A reference to this ShapeCoordinate.

◆ ShowMargins()

bool HPS::ShapeCoordinate::ShowMargins ( FloatArray out_margins) const

Shows the margins for this ShapeCoordinate.

Parameters
out_marginsThe margins for this ShapeCoordinate.
Returns
true if margins were set, false otherwise.

◆ UnsetMargins()

ShapeCoordinate& HPS::ShapeCoordinate::UnsetMargins ( )

Removes the margins for this ShapeCoordinate.

Returns
A reference to this ShapeCoordinate.

Member Data Documentation

◆ margins

FloatArray HPS::ShapeCoordinate::margins

◆ radius

float HPS::ShapeCoordinate::radius

◆ x

float HPS::ShapeCoordinate::x

◆ y

float HPS::ShapeCoordinate::y

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