#include <CeylanTripoint.h>
Public Types | |
enum | TextOutputFormat { rawText, html } |
Defines what text output formats for TextDisplayable instances are available. More... | |
Public Member Functions | |
Tripoint (Real x0=0, Real x1=0, Real x2=0) | |
Constructs a new vector with specified coordinates. | |
virtual | ~Tripoint () throw () |
Basic virtual destructor. | |
virtual void | setTo (Real x0, Real x1, Real x2) |
Reassigns this tripoint's coordinates. | |
virtual void | setAllElementsTo (Real commonValue) |
Sets this point so that all its elements equal commonValue. | |
virtual Real | getElementAt (MatrixIndex index) const |
Returns indexed element. | |
virtual void | setElementAt (MatrixIndex index, Real newValue) |
Sets indexed element to specified value. | |
virtual const std::string | toString (VerbosityLevels level=high) const |
Returns a user-friendly description of the state of this object. | |
virtual void | nullify () |
Sets this Point to the null Point (all coordinates zeroed). | |
Static Public Member Functions | |
static const std::string | ToString (std::list< TextDisplayable * > displayables, Ceylan::VerbosityLevels level=Ceylan::high) |
Returns a user-friendly description of this list of pointers to text displayable instances. | |
static TextOutputFormat | GetOutputFormat () |
Returns the current overall text format to be used by TextDisplayable instances. | |
static void | SetOutputFormat (TextOutputFormat newOutputFormat) |
Sets the current overall text format to be used by TextDisplayable instances. | |
Static Public Attributes | |
static const MatrixIndex | Dimensions = 3 |
Tells what is the dimension for this point. | |
Protected Attributes | |
Real | _coordinates [Dimensions] |
The three coordinates of this tripoint. | |
Static Protected Attributes | |
static TextOutputFormat | _OutputFormat = rawText |
The text format to be used currently by TextDisplayable instances. | |
Friends | |
class | Vector3 |
Must access to each other's coordinates. | |
class | Matrix3 |
Must access to each other's coordinates. | |
CEYLAN_DLL friend bool | operator== (const Tripoint &t1, const Tripoint &t2) |
Tells whether the two tripoints have the same elements. | |
CEYLAN_DLL friend bool | operator!= (const Tripoint &t1, const Tripoint &t2) |
Tells whether the two tripoints have the same elements. | |
CEYLAN_DLL friend Tripoint | operator+ (const Tripoint &t, const Vector3 &v) |
Translates a 3D point of specified 3D vector: result = t + v. | |
CEYLAN_DLL friend Tripoint | operator- (const Tripoint &t, const Vector3 &v) |
Translates a 3D point of specified opposite 3D vector: result = t - v. | |
CEYLAN_DLL friend Vector3 | vectorize (const Tripoint &t) |
Transforms a 3D point into a 3D vector, which will have exactly the same coordinates. | |
CEYLAN_DLL friend Vector3 | vectorize (const Tripoint &t1, const Tripoint &t2) |
Constructs a 3D vector from two 3D points: result = t2 - t1. |
Points and vectors are basically the same beasts, except they can mean different things to the developer. The Vector class is more versatile.
Definition at line 72 of file CeylanTripoint.h.
enum Ceylan::TextDisplayable::TextOutputFormat [inherited] |
Defines what text output formats for TextDisplayable instances are available.
Definition at line 124 of file CeylanTextDisplayable.h.
Constructs a new vector with specified coordinates.
Definition at line 62 of file CeylanTripoint.cc.
References _coordinates.
Tripoint::~Tripoint | ( | ) | throw () [virtual] |
Real Tripoint::getElementAt | ( | MatrixIndex | index | ) | const [virtual] |
Returns indexed element.
Index ranges from 0 to Dimensions-1.
MathsException | if index is out of bounds and if in debug mode. |
Implements Ceylan::Maths::Linear::Point.
Definition at line 103 of file CeylanTripoint.cc.
References _coordinates, and Dimensions.
TextDisplayable::TextOutputFormat TextDisplayable::GetOutputFormat | ( | ) | [static, inherited] |
Returns the current overall text format to be used by TextDisplayable instances.
Definition at line 63 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::formatStringList(), Ceylan::formatStringMap(), Ceylan::XML::XMLMarkup::toString(), Ceylan::Maths::Linear::Vector3::toString(), Ceylan::Maths::Linear::Vector2::toString(), toString(), Ceylan::Module::toString(), Ceylan::Maths::Linear::Matrix3::toString(), Ceylan::Maths::Linear::Matrix2::toString(), Ceylan::Maths::Linear::HomogeneousMatrix3::toString(), and Ceylan::Maths::Linear::Bipoint::toString().
void Point::nullify | ( | ) | [virtual, inherited] |
Sets this Point to the null Point (all coordinates zeroed).
Definition at line 52 of file CeylanPoint.cc.
References Ceylan::Maths::Linear::Point::setAllElementsTo().
void Tripoint::setAllElementsTo | ( | Real | commonValue | ) | [virtual] |
Sets this point so that all its elements equal commonValue.
Implements Ceylan::Maths::Linear::Point.
Definition at line 91 of file CeylanTripoint.cc.
References _coordinates, and Dimensions.
void Tripoint::setElementAt | ( | MatrixIndex | index, | |
Real | newValue | |||
) | [virtual] |
Sets indexed element to specified value.
Index ranges from 0 to Dimensions-1.
MathsException | if index is out of bounds and if in debug mode. |
Implements Ceylan::Maths::Linear::Point.
Definition at line 120 of file CeylanTripoint.cc.
References _coordinates, and Dimensions.
void TextDisplayable::SetOutputFormat | ( | TextOutputFormat | newOutputFormat | ) | [static, inherited] |
Sets the current overall text format to be used by TextDisplayable instances.
newOutputFormat | the new output format. |
Definition at line 72 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::Log::LogHolder::LogHolder().
Reassigns this tripoint's coordinates.
Definition at line 80 of file CeylanTripoint.cc.
References _coordinates.
const std::string TextDisplayable::ToString | ( | std::list< TextDisplayable * > | displayables, | |
Ceylan::VerbosityLevels | level = Ceylan::high | |||
) | [static, inherited] |
Returns a user-friendly description of this list of pointers to text displayable instances.
displayables | a list of pointers to TextDisplayable instances/ | |
level | the requested verbosity level. |
Definition at line 45 of file CeylanTextDisplayable.cc.
References Ceylan::formatStringList().
const string Tripoint::toString | ( | VerbosityLevels | level = high |
) | const [virtual] |
Returns a user-friendly description of the state of this object.
level | the requested verbosity level. |
Reimplemented from Ceylan::Maths::Linear::Point.
Definition at line 137 of file CeylanTripoint.cc.
References _coordinates, Ceylan::DigitOutputPrecision, Dimensions, Ceylan::Log::LogPlug::error(), Ceylan::TextDisplayable::GetOutputFormat(), Ceylan::high, and Ceylan::TextDisplayable::html.
friend class Matrix3 [friend] |
Tells whether the two tripoints have the same elements.
Translates a 3D point of specified 3D vector: result = t + v.
Translates a 3D point of specified opposite 3D vector: result = t - v.
Tells whether the two tripoints have the same elements.
friend class Vector3 [friend] |
Constructs a 3D vector from two 3D points: result = t2 - t1.
Transforms a 3D point into a 3D vector, which will have exactly the same coordinates.
Real Ceylan::Maths::Linear::Tripoint::_coordinates[Dimensions] [protected] |
The three coordinates of this tripoint.
Definition at line 239 of file CeylanTripoint.h.
Referenced by getElementAt(), setAllElementsTo(), setElementAt(), setTo(), toString(), and Tripoint().
TextDisplayable::TextOutputFormat TextDisplayable::_OutputFormat = rawText [static, protected, inherited] |
The text format to be used currently by TextDisplayable instances.
Definition at line 158 of file CeylanTextDisplayable.h.
Referenced by Ceylan::TextDisplayable::GetOutputFormat(), and Ceylan::TextDisplayable::SetOutputFormat().
const MatrixIndex Ceylan::Maths::Linear::Tripoint::Dimensions = 3 [static] |
Tells what is the dimension for this point.
Reimplemented from Ceylan::Maths::Linear::Point.
Definition at line 231 of file CeylanTripoint.h.
Referenced by getElementAt(), setAllElementsTo(), setElementAt(), and toString().