42 #include "PlaneType.hh" 51 xDirection = _xDirection;
52 yDirection = _yDirection;
53 normal = (_xDirection % _yDirection).normalize();
63 for (
int i=0; i < 3; i++)
64 if ( _normal[i] != 0.0 ){
70 std::cerr <<
"PlaneNode: normal is invalid!" << std::endl;
75 xDirection[comp] = (-_normal[ (comp + 1) % 3 ] - _normal[(comp + 2) % 3]) / _normal[comp];
76 xDirection[ (comp + 1) % 3 ] = 1;
77 xDirection[ (comp + 2) % 3 ] = 1;
80 yDirection = _normal % xDirection;
95 normal = (xDirection % yDirection).normalize();
102 xDirection = xDirection.
normalize() * _xDirection;
103 yDirection = yDirection.
normalize() * _yDirection;
Namespace providing different geometric functions concerning angles.
void setSize(double _xDirection, double _yDirection)
Set plane size.
auto normalize() -> decltype(*this/=std::declval< VectorT< S, DIM >>().norm())
VectorT< T, 3 > transform_point(const VectorT< T, 3 > &_v) const
transform point (x',y',z',1) = M * (x,y,z,1)
void setPlane(const ACG::Vec3d &_position, const ACG::Vec3d &_xDirection, const ACG::Vec3d &)
Set plane.
void transform(const ACG::Matrix4x4d &_mat)
Transform the plane with given matrix.
VectorT< T, 3 > transform_vector(const VectorT< T, 3 > &_v) const
transform vector (x',y',z',0) = A * (x,y,z,0)