FBPickInfos Struct Reference
 
 
 
FBPickInfos Struct Reference

This reference page is linked to from the following overview topics: Data types & properties, MotionBuilder 2014.


#include <fbrenderer.h>


Class Description

Picking information structure.

This class holds information related to the picking action on a renderer. The intersection info (Position and Normal) won't be accurate for the following type of models:

  • Locators: Camera, Lights, Marker and etc.
  • Custom Model inherited from FBModel.
  • And GPU skinned models.

Sample C++ code:

       FBPickInfosList lList;
       FBSystem lSystem;
       FBRenderer* lRenderer = lSystem.Renderer;
       lRenderer->Pick( 200, 200, lList );
   
       int lIdx;
       for( lIdx = 0; lIdx < lList.GetCount(); ++lIdx )
       {
           FBString lName = "aNull ";
           lName += (char*)lList[lIdx].mModel->Name;
   
           FBModelNull* lNull = new FBModelNull( lName );
           lNull->Visible = true;
           lNull->Translation = lList[lIdx].mPoint;
       }

Definition at line 263 of file fbrenderer.h.

Public Member Functions

  FBPickInfos (FBModel *pModel, FBVector3d pPoint, FBVector3d pNormal, int pSubItemIndex)
  FBPickInfos.

Public Attributes

FBModel mModel
  Model picked.
FBVector3d  mPoint
  Location of the pick on the model's surface in world space.
FBVector3d  mNormal
  Normal of the pick on the model's surface in world space.
int  mSubItemIndex
  Picked sub item index, -1 for whole object.

Constructor & Destructor Documentation

FBPickInfos::FBPickInfos ( FBModel pModel,
FBVector3d  pPoint,
FBVector3d  pNormal,
int  pSubItemIndex 
) [inline]

FBPickInfos.

Parameters:
pModel a handel to the model(FBModel*).
pPoint position (FBVector3d).
pNormal normal direction (FBVector3d).
pSubItemIndex sub item index, -1 for whole object.

Definition at line 271 of file fbrenderer.h.

            : mModel( pModel ), mPoint( pPoint ), mNormal (pNormal), mSubItemIndex(pSubItemIndex) {};

Member Data Documentation

Model picked.

Definition at line 272 of file fbrenderer.h.

Location of the pick on the model's surface in world space.

Definition at line 275 of file fbrenderer.h.

Normal of the pick on the model's surface in world space.

Definition at line 276 of file fbrenderer.h.

Picked sub item index, -1 for whole object.

Definition at line 277 of file fbrenderer.h.


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