48 PlaneT(
const T a,
const T b,
const T c,
const T d );
131 template <
typename T>
138 template <
typename T>
144 template <
typename T>
148 template <
typename T>
154 template <
typename T>
157 this->
init(normal, d);
160 template <
typename T>
163 T d = - (point * normal);
164 this->
init(normal, d);
167 template <
typename T>
175 this->
init(normal, d);
178 template <
typename T>
181 m_data.
set(normal[0], normal[1], normal[2], distance);
184 template <
typename T>
190 template <
typename T>
193 template <
typename T>
196 template <
typename T>
199 template <
typename T>
202 template <
typename T>
205 template <
typename T>
208 template <
typename T>
211 return ( getNormal() * point ) + getDistance();
214 template <
typename T>
217 return point - signedDistanceToPoint( point ) * getNormal();
220 template <
typename T>
226 point = getNormal() * (-getDistance());
229 point = point * transform;
232 normal = transform.transform3x3( getNormal() );
235 return PlaneT<T>(normal, - (normal * point));
238 template <
typename T>
244 point = getNormal() * (-getDistance());
247 point = point * transform;
250 normal = transform.transform3x3( getNormal() );
253 return PlaneT<T>(normal, - (normal * point));
#define AGX_TYPE_BINDING(_Type, _Name)
Class representing the mathematical concept of a plane, also called a half- space.
PlaneT calculateTransformedPlane(const agx::AffineMatrix4x4 &transform) const
Create a new plane that is equal to the current plane transformed by the given transform.
void setNormal(const agx::Vec3T< T > &normal)
Change the orientation of the plane so that the given normal becomes the new normal of the plane.
agx::Vec3T< T > project(const agx::Vec3T< T > &point) const
Projects the point point onto this plane.
agx::Vec3T< T > getNormal() const
T signedDistanceToPoint(const agx::Vec3T< T > &point) const
Calculates the distance from the plane to a point.
void setDistance(const T distance)
Translate the plane parallel to the normal so that the given distance becomes the new distance from t...
PlaneT()
Create a plane with it surface on the X and Y axes.
PlaneT calculatePlane(const agx::AffineMatrix4x4 &transform) const
Create a new plane that is equal to the current plane transformed by the given transform.
void set(const agx::Vec4T< T > &plane)
Reconfigure this plane according the given specification.
A class holding 3 dimensional vectors and providing basic arithmetic.
Real normalize()
Normalize the vector so that it has length unity.
A class holding 4 dimensional vectors and providing basic arithmetic.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
PlaneT< agx::Real64 > Plane64
PlaneT< agx::Real > Plane
std::ostream & operator<<(std::ostream &os, const agx::AddedMassInteraction::Matrix6x6 &m)
PlaneT< agx::Real32 > Plane32
void AGXPHYSICS_EXPORT init()
Initialize AGX Dynamics API including thread resources and must be executed before using the AGX API.