48 PlaneT(
const T a,
const T b,
const T c,
const T d );
131 template <
typename T>
132 std::ostream& operator<<(std::ostream& output, const PlaneT<T>& plane)
134 output << plane.getNormal() <<
" : " << plane.getDistance();
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>
214 template <
typename T>
220 template <
typename T>
232 normal = transform.transform3x3(
getNormal() );
235 return PlaneT<T>(normal, - (normal * point));
238 template <
typename T>
250 normal = transform.transform3x3(
getNormal() );
253 return PlaneT<T>(normal, - (normal * point));
PlaneT< agx::Real64 > Plane64
A class holding 4 dimensional vectors and providing basic arithmetic.
PlaneT< agx::Real > Plane
#define AGX_TYPE_BINDING(_Type, _Name)
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
Class representing the mathematical concept of a plane, also called a half- space.
void set(const agx::Vec4T< T > &plane)
Reconfigure this plane according the given specification.
PlaneT< agx::Real32 > Plane32
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...
PlaneT calculateTransformedPlane(const agx::AffineMatrix4x4 &transform) const
Create a new plane that is equal to the current plane transformed by the given transform.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
agx::Vec3T< T > getNormal() const
/return The normal of the plane.
Real normalize()
Normalize the vector so that it has length unity.
A class holding 3 dimensional vectors and providing basic arithmetic.
PlaneT calculatePlane(const agx::AffineMatrix4x4 &transform) const
Create a new plane that is equal to the current plane transformed by the given transform.
agx::Vec3T< T > project(const agx::Vec3T< T > &point) const
Projects the point point onto this plane.
PlaneT()
Create a plane with it surface on the X and Y axes.
void setDistance(const T distance)
Translate the plane parallel to the normal so that the given distance becomes the new distance from t...
T signedDistanceToPoint(const agx::Vec3T< T > &point) const
Calculates the distance from the plane to a point.