24CNode::CNode(
XYZ Position,
XYZ Tangent,
XYZ Up,
double Angle)
45 m_Position = valueify<XYZ>(Element.Attribute(
"Position"));
46 m_Tangent = valueify<XYZ>(Element.Attribute(
"Tangent"));
47 m_Up = valueify<XYZ>(Element.Attribute(
"Up"));
48 m_Angle = valueify<double>(Element.Attribute(
"Angle"));
76 TGERROR(
"Error projecting up vector to be orthogonal to the tangent vector");
90 XYZ RotatedSide = Rot*Side;
#define TGERROR(MESSAGE)
Macros used to report the file name and line number to the TexGenError and TexGenLog functions.
XYZ m_Up
Unit vector which represents the up direction (must be perpendicular to m_Tangent)
virtual void PopulateTiXmlElement(TiXmlElement &Element, OUTPUT_TYPE OutputType) const
Used for saving data to XML.
XYZ m_Tangent
Unit vector tangent to the yarn path at this node.
virtual void Translate(XYZ Vector)
Translate the Node by given vector.
void ProjectUp()
Project the Up vector such that it is perpendicular to the tangent.
CNode(XYZ Position=XYZ(), XYZ Tangent=XYZ(), XYZ Up=XYZ(0, 0, 1), double Angle=0.0)
Create a node.
XYZ m_Position
Coordinates representing the position of the node.
XYZ GetSide() const
Get the side vector.
virtual void Rotate(WXYZ Rotation, XYZ Origin=XYZ(0, 0, 0))
Rotate the Node by given quaternion.
Namespace containing a series of customised math operations not found in the standard c++ library.
double GetLength(const XYZ &Point1, const XYZ &Point2)
Get the length between two points.
std::string stringify(const T &x, int iPrecision=12, bool bScientific=true)
Function to convert a value (e.g. int, double, etc...) to a string.
WXYZ & Normalise(WXYZ &Quaternion)
Normalise the quaternion and return it.
double DotProduct(const XYZ &left, const XYZ &right)
Get the dot product of two vectors.
XYZ CrossProduct(const XYZ &left, const XYZ &right)
Get the cross product of two vectors.
Struct for representing a quaternion.
Struct for representing points in 3D space.