# IRdVolumeTree Interface Reference

Inherits IRsDataObject.

List of all members.

## Public Member Functions
HRESULT | SetBox ([in] RtFloat *box)
HRESULT | GetBox ([out] RtFloat *box)
HRESULT | InitData ([in] RtFloat *box)
HRESULT | ClearData (void)
HRESULT | RayIntersection ([in] RtPoint *p0,[in] RtPoint *ray,[out] IRsNodeList **node)
HRESULT | UpdateBBox ([in] IRsBaseNode *node,[in] IRdFloatArray *box)
HRESULT | AddBBox ([in] IRsBaseNode *node,[in] IRdFloatArray *box)
HRESULT | AddObject ([in] IRsBaseNode *pNode)
HRESULT | BoxIntersection ([in] RtFloat *box,[out] IRsNodeList **list)
HRESULT | RemoveObject ([in] IRsBaseNode *pNode)
HRESULT | SetDepth ([in] RtUshort depth)
HRESULT | SetNode ([in] IRsNode *pNode)
HRESULT | GetNode ([out] IRsNode **pNode)
HRESULT | FrustumIntersection ([in] IRsNode *pViewRoot,[in] RtVector4f *planes,[out] IRsNodeList **list)

## Detailed Description

IRdVolumeTree interface provides access to octree data.

## Member Function Documentation

HRESULT IRdVolumeTree::SetBox | ( | [in] RtFloat * | box | ) |

Set the top box for octree data

Parameters:

  | box | - bounding box {xmin, xmax,....,zmax}

HRESULT IRdVolumeTree::GetBox | ( | [out] RtFloat * | box | ) |

Return the top box for octree data

Parameters:

  | box | - bounding box {xmin, xmax,....,zmax}

HRESULT IRdVolumeTree::InitData | ( | [in] RtFloat * | box | ) |

Initialize octree data for input bounding box

Parameters:

  | box | - bounding box {xmin, xmax,....,zmax}

HRESULT IRdVolumeTree::ClearData | ( | void |  | ) |

Clear octree data for input bounding box

HRESULT IRdVolumeTree::RayIntersection | ( | [in] RtPoint * | p0,
|  | [in] RtPoint * | ray,
|  | [out] IRsNodeList ** | node |
| ) |  |  |

Return the intersection (list of objects) of ray with octree

Parameters:

  | p0 | - origin of ray
  | ray | - direction of ray
  | node | - list of objects

HRESULT IRdVolumeTree::UpdateBBox | ( | [in] IRsBaseNode * | node,
|  | [in] IRdFloatArray * | box |
| ) |  |  |

Update position of object with bonding box in octree

Parameters:

  | node | - object to be updated
  | box | - bonding box of objects

HRESULT IRdVolumeTree::AddBBox | ( | [in] IRsBaseNode * | node,
|  | [in] IRdFloatArray * | box |
| ) |  |  |

Add object with bonding box to octree

Parameters:

  | node | - object to be updated
  | box | - bonding box of objects

HRESULT IRdVolumeTree::AddObject | ( | [in] IRsBaseNode * | pNode | ) |

Add object to octree

Parameters:

  | pNode | - object to be updated

HRESULT IRdVolumeTree::BoxIntersection | ( | [in] RtFloat * | box,
|  | [out] IRsNodeList ** | list |
| ) |  |  |

Return the intersection (list of objects) of given box with octree

Parameters:

  | box | - input box
  | list | - list of objects

HRESULT IRdVolumeTree::RemoveObject | ( | [in] IRsBaseNode * | pNode | ) |

Remove object from octree

Parameters:

  | pNode | - object to be updated

HRESULT IRdVolumeTree::SetDepth | ( | [in] RtUshort | depth | ) |

Set depth of octree

Parameters:

  | depth | - octree's depth

HRESULT IRdVolumeTree::SetNode | ( | [in] IRsNode * | pNode | ) |

Set object that generated octree data

Parameters:

  | pNode | - octree object

HRESULT IRdVolumeTree::GetNode | ( | [out] IRsNode ** | pNode | ) |

Return object that generated octree data

Parameters:

  | pNode | - octree object

HRESULT IRdVolumeTree::FrustumIntersection | ( | [in] IRsNode * | pViewRoot,
|  | [in] RtVector4f * | planes,
|  | [out] IRsNodeList ** | list |
| ) |  |  |

Return the intersection (list of objects) of frustum 6 planes with octree

Parameters:

  | pViewRoot | - root encapsulator of view, if NULL default scene is taken
  | planes | - input 6 planes (frustum)
  | list | - list of objects