Blender V4.3
NodeTransform.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
13#include "NodeGroup.h"
14
15#include "../geometry/Geom.h"
16
18
19namespace Freestyle {
20
21using namespace Geometry;
22
23class NodeTransform : public NodeGroup {
24 public:
26 {
27 _Matrix = Matrix44r::identity();
28 _Scaled = false;
29 }
30
31 virtual ~NodeTransform() {}
32
34 void Translate(real x, real y, real z);
35
42 void Rotate(real iAngle, real x, real y, real z);
43
48 void Scale(real x, real y, real z);
49
51 void MultiplyMatrix(const Matrix44r &iMatrix);
52
54 void setMatrix(const Matrix44r &iMatrix);
55
57 virtual void accept(SceneVisitor &v);
58
60 virtual void AddBBox(const BBox<Vec3r> &iBBox);
61
67 bool isScaled(const Matrix44r &M);
68
70 inline const Matrix44r &matrix() const
71 {
72 return _Matrix;
73 }
74
75 inline bool scaled() const
76 {
77 return _Scaled;
78 }
79
80 private:
81 Matrix44r _Matrix;
82 bool _Scaled;
83};
84
85} /* namespace Freestyle */
Configuration definitions.
Vectors and Matrices (useful type definitions)
Class to represent a group node. This node can contains several children.
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
Definition btQuadWord.h:117
virtual void accept(SceneVisitor &v)
void setMatrix(const Matrix44r &iMatrix)
const Matrix44r & matrix() const
void MultiplyMatrix(const Matrix44r &iMatrix)
void Translate(real x, real y, real z)
virtual void AddBBox(const BBox< Vec3r > &iBBox)
void Scale(real x, real y, real z)
bool isScaled(const Matrix44r &M)
void Rotate(real iAngle, real x, real y, real z)
static SquareMatrix< real, N > identity()
Definition VecMat.h:771
#define M
inherits from class Rep
Definition AppCanvas.cpp:20
double real
Definition Precision.h:14