# IRnPhysActiveObj Interface Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | InitPhysObj (void)
HRESULT | InitialState (void)
HRESULT | GetOBBTree ([out] IRdOBBTree **pOBBTree)
HRESULT | GetPhysAttr ([out] RtPhysAttr *attr)
HRESULT | GetShapeInfo ([out] IRsBaseNode **pShape)
HRESULT | GetResistance ([out] RtFloat *resistance,[out] RtFloat *volume)
HRESULT | GetCog ([out] RtFloat *cog_x,[out] RtFloat *cog_y,[out] RtFloat *cog_z)
HRESULT | GetStringParam ([out] RtBool *effect,[out] RtPoint *cog,[out] RtFloat *radius,[out] RtFloat *power)
HRESULT | IsCollisionDisabled ()
HRESULT | DisableInSceneOctree ()
HRESULT | EnableInSceneOctree ()
HRESULT | IsAdhesive ()
HRESULT | GetBBox ([out] RtFloat *box)
HRESULT | SetPhysAttr ([in] RtPhysAttr *attr)
HRESULT | IsBrokenPart ()
HRESULT | UpdateShapeInfo ()
HRESULT | InitDefaultCog ()

## Detailed Description

IRnPhysActiveObj interface provides methods for work with phys object that stores physical attributes.

## Member Function Documentation

HRESULT IRnPhysActiveObj::InitPhysObj | ( | void |  | ) |

Initialize phys object according object's owner.

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRnPhysActiveObj::InitialState | ( | void |  | ) |

Reset phys object to initial state.

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRnPhysActiveObj::GetOBBTree | ( | [out] IRdOBBTree ** | pOBBTree | ) |

Return obb-tree data for object mesh.

Parameters:

  | pOBBTree | [out] .

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRnPhysActiveObj::GetPhysAttr | ( | [out] RtPhysAttr * | attr | ) |

Return all phys attributes.

Parameters:

  | attr | [out] .

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRnPhysActiveObj::GetShapeInfo | ( | [out] IRsBaseNode ** | pShape | ) |

Return shape collision node.

Parameters:

  | pShape | [out] .

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRnPhysActiveObj::GetResistance | ( | [out] RtFloat * | resistance,
|  | [out] RtFloat * | volume |
| ) |  |  |

Return resistance and volume of object.

Parameters:

  | resistance | [out] .
  | volume | [out] .

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRnPhysActiveObj::GetCog | ( | [out] RtFloat * | cog_x,
|  | [out] RtFloat * | cog_y,
|  | [out] RtFloat * | cog_z |
| ) |  |  |

Return centre of gravity of object.

Parameters:

  | cog_x | [out] Center of gravity for x axis.
  | cog_y | [out] Center of gravity for y axis.
  | cog_z | [out] Center of gravity for z axis.

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRnPhysActiveObj::GetStringParam | ( | [out] RtBool * | effect,
|  | [out] RtPoint * | cog,
|  | [out] RtFloat * | radius,
|  | [out] RtFloat * | power |
| ) |  |  |

Return string attributes for object.

Parameters:

  | effect | [out] If TRUE string effect is on, if FALSE string effect is off.
  | cog | [out] Center of gravity.
  | radius | [out] String radius.
  | power | [out] String stiffness.

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRnPhysActiveObj::IsCollisionDisabled | ( |  | ) |

Check whether collision with objects is disabled.

Returns:
  S_OK if yes, S_FALSE if no.

HRESULT IRnPhysActiveObj::DisableInSceneOctree | ( |  | ) |

Disable parent object in octree.

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRnPhysActiveObj::EnableInSceneOctree | ( |  | ) |

Enable parent object in octree.

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRnPhysActiveObj::IsAdhesive | ( |  | ) |

Check whether object is allowed to be adhesive.

Returns:
  S_OK if yes, S_FALSE if no.

HRESULT IRnPhysActiveObj::GetBBox | ( | [out] RtFloat * | box | ) |

Return bounding box of object.

Parameters:

  | box | [out] Float array with bounding box values, b[0]=xmin, b[1] = xmax,......,b[5]=zmax.

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRnPhysActiveObj::SetPhysAttr | ( | [in] RtPhysAttr * | attr | ) |

Set phys attributes.

Parameters:

  | attr | [in] .

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRnPhysActiveObj::IsBrokenPart | ( |  | ) |

Check whether object is broken part.

Returns:
  S_OK if yes, S_FALSE if no.

HRESULT IRnPhysActiveObj::UpdateShapeInfo | ( |  | ) |

Update collision shape for object.

Returns:
  standard HRESULT processing can be applied to returned value.

HRESULT IRnPhysActiveObj::InitDefaultCog | ( |  | ) |

Init default center of gravity.

Returns:
  standard HRESULT processing can be applied to returned value.