H3D API  2.4.1
Public Member Functions | Static Public Member Functions | List of all members
H3D::Bound Class Referenceabstract

The Bound class is the abstract base class for all classes specifying bounding objects. More...

#include <H3D/Bound.h>

Inheritance diagram for H3D::Bound:
Inheritance graph

Public Member Functions

virtual bool isInside (const Vec3f &p)=0
 Determines if a given point is inside the bound or not.
 
virtual bool lineSegmentIntersect (const Vec3f &from, const Vec3f &to)=0
 Checks a line segment for intersection with the bound. More...
 
virtual bool movingSphereIntersect (const Vec3f &from, const Vec3f &to, H3DFloat radius)=0
 Checks a moving sphere for intersection with the bound. More...
 
virtual Vec3f closestPoint (const Vec3f &p)=0
 Returns the closest point on the bound to the given point.
 
virtual void render ()
 Render the outline of the bound with OpenGL.
 

Static Public Member Functions

template<class Iterator >
static BoundboundUnion (Iterator begin, Iterator end)
 Returns a Bound that is the union between all the bounds specified by the iterators. More...
 
template<class Iterator >
static BoundSFBoundUnion (Iterator begin, Iterator end)
 Returns a Bound that is the union between the Bound objects in the SFBound fields specified by the iterators.
 

Detailed Description

The Bound class is the abstract base class for all classes specifying bounding objects.

Member Function Documentation

◆ boundUnion()

template<class Iterator >
Bound * H3D::Bound::boundUnion ( Iterator  begin,
Iterator  end 
)
inlinestatic

Returns a Bound that is the union between all the bounds specified by the iterators.

Iterator is a iterator to a Bound.

Referenced by H3D::H3DWindowNode::calculateFarAndNearPlane().

◆ lineSegmentIntersect()

virtual bool H3D::Bound::lineSegmentIntersect ( const Vec3f &  from,
const Vec3f &  to 
)
pure virtual

Checks a line segment for intersection with the bound.

If line intersects, true is returned.

Implemented in H3D::BoxBound, H3D::EmptyBound, and H3D::InfiniteBound.

Referenced by H3D::GeometryGroup::lineIntersect(), H3D::Text::lineIntersect(), and H3D::X3DGroupingNode::lineIntersect().

◆ movingSphereIntersect()

virtual bool H3D::Bound::movingSphereIntersect ( const Vec3f &  from,
const Vec3f &  to,
H3DFloat  radius 
)
pure virtual

Checks a moving sphere for intersection with the bound.

If the sphere intersects, true is returned.

Implemented in H3D::BoxBound, H3D::EmptyBound, and H3D::InfiniteBound.

Referenced by H3D::GeometryGroup::movingSphereIntersect(), and H3D::X3DGroupingNode::movingSphereIntersect().


The documentation for this class was generated from the following file: