H3D API
2.4.1
|
Used as input to intersection functions. More...
#include <H3D/Node.h>
Public Member Functions | |
void | addTransform () |
Adds the current transform from local coordinate space to global coordinate space to geometry_transforms. | |
const vector< Matrix4f > & | getGeometryTransforms () |
Get the info in geometry_transforms. | |
const Matrix4f & | getCurrentTransform () |
Get the current matrix that transforms from local coordinate space to global coordinate space. | |
void | pushTransform (const Matrix4f &matrix) |
Push onto stack of current transforms. More... | |
void | popTransform () |
Remove the top on the stack of current transforms. | |
void | transformResult () |
Transforms point and normal in the IntersectionInfo vector from local to global space. | |
void | addResults (IntersectionInfo &temp_result, Node *the_node, bool add_transform=true) |
Convenience function to add results to the struct. | |
virtual void | clearData () |
Clears data so the struct can be used in a closestPoint function again. | |
Public Attributes | |
vector< Node * > | theNodes |
A vector of pointers to nodes. More... | |
vector< IntersectionInfo > | result |
A vector of HAPI::IntersectionInfo that stores result of intersection such as point and normal. More... | |
void * | user_data |
Optional user_data in case someone want to do add some extra feature to collision functions in one or several custom made nodes. | |
bool | override_no_collision |
Flag used to know if collision function should be called for the children in the Collision Node regardless if it is enabled or not. | |
bool | collide_invisible |
Flag used to know if collision function should be called for the children in a ToogleGroup Node even if graphicsOn is false. More... | |
Protected Attributes | |
vector< Matrix4f > | geometry_transforms |
A vector of matrices from the local coordinate space to global space for each node that the line intersects. | |
stack< Matrix4f > | current_matrix |
The top of the stack is the current matrix that transforms from the local coordinate space where this Node resides in the scenegraph to global space. | |
Used as input to intersection functions.
If the intersection function succeeds this struct will contain the nodes that were intersected, the transform matrices from local to global for each intersected node and a vector of IntersectionInfo structs containing information about the intersection for each intersected node geometry. The meaning of global coordinates in the comments regarding this struct refers to the coordinate system of the input to the function for which this struct contains collision information.
|
inline |
Push onto stack of current transforms.
The top is the one that is considered the current transform in calls to getCurrentTransform().
Referenced by H3D::MatrixTransform::closestPoint(), H3D::MatrixTransform::lineIntersect(), and H3D::MatrixTransform::movingSphereIntersect().
bool H3D::Node::NodeIntersectResult::collide_invisible |
Flag used to know if collision function should be called for the children in a ToogleGroup Node even if graphicsOn is false.
The default behaviour is to only collide with visible objects.
Referenced by H3D::ToggleGroup::closestPoint(), H3D::ToggleGroup::lineIntersect(), and H3D::ToggleGroup::movingSphereIntersect().
vector< IntersectionInfo > H3D::Node::NodeIntersectResult::result |
A vector of HAPI::IntersectionInfo that stores result of intersection such as point and normal.
The point and normal will be in local coordinates of the intersected node. For convenience there is a function called transformResults() which changes the point and normal into global coordinates.
Referenced by H3D::PyNode::closestPoint(), H3D::H3DNavigation::doNavigation(), H3D::PyNode::lineIntersect(), H3D::X3DViewpointNode::translate(), H3D::MagneticGeometryEffect::traverseSG(), and H3D::X3DPointingDeviceSensorNode::updateX3DPointingDeviceSensors().
vector< Node * > H3D::Node::NodeIntersectResult::theNodes |
A vector of pointers to nodes.
Usually the X3DGeometryNodes that caused the IntersectionInfo results.
Referenced by H3D::PyNode::closestPoint(), H3D::H3DNavigation::doNavigation(), H3D::PyNode::lineIntersect(), and H3D::X3DPointingDeviceSensorNode::updateX3DPointingDeviceSensors().