21 template <
typename T2>
35 m_Vector[2] = floor(v.
z());
60 floor((
double)
y()/(
double)vec.
y()),
61 floor((
double)
z()/(
double)vec.
z()));
75 for (
int i=0; i<3; i++) {
85 for (
int i=0; i<3; i++) {
104 template <
typename T>
114 floor((
double)
y()/(
double)val),
115 floor((
double)
z()/(
double)val));
118 template <
typename T>
124 template <
typename T>
127 return x()==vec.
x() &&
y()==vec.
y() &&
z()==vec.
z();
130 template <
typename T>
133 return x()!=vec.
x() ||
y()!=vec.
y() ||
z()!=vec.
z();
136 template <
typename T>
141 }
else if (
z() < vec.
z()) {
143 }
else if (
y() > vec.
y()) {
145 }
else if (
y() < vec.
y()) {
147 }
else if (
x() > vec.
x()) {
149 }
else if (
x() < vec.
x()) {
156 template <
typename T>
161 }
else if (
z() < vec.
z()) {
163 }
else if (
y() > vec.
y()) {
165 }
else if (
y() < vec.
y()) {
167 }
else if (
x() > vec.
x()) {
169 }
else if (
x() < vec.
x()) {
176 template <
typename T>
181 }
else if (
z() > vec.
z()) {
183 }
else if (
y() < vec.
y()) {
185 }
else if (
y() > vec.
y()) {
187 }
else if (
x() < vec.
x()) {
189 }
else if (
x() > vec.
x()) {
196 template <
typename T>
201 }
else if (
z() > vec.
z()) {
203 }
else if (
y() < vec.
y()) {
205 }
else if (
y() > vec.
y()) {
207 }
else if (
x() < vec.
x()) {
209 }
else if (
x() > vec.
x()) {
216 template <
typename T>
220 (
y()<vec.
y()?
y():vec.
y()),
221 (
z()<vec.
z()?
z():vec.
z()));
224 template <
typename T>
228 (
y()>vec.
y()?
y():vec.
y()),
229 (
z()>vec.
z()?
z():vec.
z()));
232 template <
typename T>
238 template <
typename T>
241 return x()*
x() +
y()*
y() +
z()*
z();
244 template <
typename T>
250 template <
typename T>
255 if (::fabs((
double)len) < 1e-10) {
264 template <
typename T>
269 if (::fabs((
double)len) < 1e-10) {
278 template <
typename T>
281 return v1.
x()*v2.
x() + v1.
y()*v2.
y() + v1.
z()*v2.
z();
284 template <
typename T>
288 v1.
z()*v2.
x() - v1.
x()*v2.
z(),
289 v1.
x()*v2.
y() - v1.
y()*v2.
x());
292 template <
typename T>
298 template <
typename T>
301 settings->beginGroup(name);
303 settings->setValue(
"x",
x());
304 settings->setValue(
"y",
y());
305 settings->setValue(
"z",
z());
307 settings->endGroup();
326 template <
typename T>
329 return QString(
"[%1,%2,%3]").arg(
x()).arg(
y()).arg(
z());
CctwVector3D< T > operator/(const CctwVector3D< T > &vec) const
bool operator!=(const CctwVector3D< T > &vec) const
static CctwVector3D< T > normal(const CctwVector3D< T > &v1, const CctwVector3D< T > &v2)
bool operator<=(const CctwVector3D< T > &vec) const
bool operator==(const CctwVector3D< T > &vec) const
CctwVector3D< T > operator*(const CctwVector3D< T > &vec) const
CctwVector3D< T > operator-(const CctwVector3D< T > &vec) const
CctwVector3D< T > operator+(const CctwVector3D< T > &vec) const
bool operator>=(const CctwVector3D< T > &vec) const
bool operator<(const CctwVector3D< T > &vec) const
static T dotProduct(const CctwVector3D< T > &v1, const CctwVector3D< T > &v2)
CctwVector3D< T > normalized() const
static CctwVector3D< T > crossProduct(const CctwVector3D< T > &v1, const CctwVector3D< T > &v2)
CctwVector3D< T > min(const CctwVector3D< T > &vec) const
void setSettingsValue(QSettings *settings, QString name)
CctwVector3D< T > operator-=(const CctwVector3D< T > &vec)
static void customSaver(const QVariant &val, QSettings *settings, QString name)
CctwVector3D< T > operator+=(const CctwVector3D< T > &vec)
CctwVector3D< T > max(const CctwVector3D< T > &vec) const
bool operator>(const CctwVector3D< T > &vec) const