50 #include "PlaneType.hh"
59 xDirection = _xDirection;
60 yDirection = _yDirection;
61 normal = (_xDirection % _yDirection).normalize();
71 for (
int i=0; i < 3; i++)
72 if ( _normal[i] != 0.0 ){
78 std::cerr <<
"PlaneNode: normal is invalid!" << std::endl;
83 xDirection[comp] = (-_normal[ (comp + 1) % 3 ] - _normal[(comp + 2) % 3]) / _normal[comp];
84 xDirection[ (comp + 1) % 3 ] = 1;
85 xDirection[ (comp + 2) % 3 ] = 1;
86 xDirection = xDirection.normalize();
88 yDirection = _normal % xDirection;
89 yDirection = yDirection.normalize();
103 normal = (xDirection % yDirection).normalize();
110 xDirection = xDirection.normalize() * _xDirection;
111 yDirection = yDirection.normalize() * _yDirection;
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)
void setSize(double _xDirection, double _yDirection)
Set plane size.
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.