Open Reality Reference Guide
FBPickInfos Struct Reference

Picking information structure. More...

#include <fbrenderer.h>

Public Member Functions

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

Public Attributes

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

Detailed 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:

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;
}
FBPropertyString Name
Read Write Property: Unique name of object.
Definition: fbcomponent.h:845
FBPropertyAnimatableVector3d Translation
Read Write Property: Lcl translation.
Definition: fbmodel.h:343
Null object class.
Definition: fbmodel.h:779
Open Reality renderer interface.
Definition: fbrenderer.h:446
bool Pick(int pX, int pY, FBPickInfosList &pPickInfosList, bool pNeedIntersectPosition=false)
Object picking selection.
Basic string class.
Definition: fbstring.h:67
Provides access to the underlying system, and the MotionBuilder scene.
Definition: fbsystem.h:157
FBPropertyRenderer Renderer
Read Only Property: Default renderer.
Definition: fbsystem.h:217
class K_DLLIMPORT FBArrayTemplate< FBPickInfos > FBPickInfosList
typedef class FBSDK_DLL FBArrayTemplate<FBPickInfos> FBPickInfosList
Definition: fbrenderer.h:290
FBModel * mModel
Model picked.
Definition: fbrenderer.h:279

Definition at line 270 of file fbrenderer.h.

Constructor & Destructor Documentation

◆ FBPickInfos()

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

FBPickInfos.

Parameters
pModela handel to the model(FBModel*).
pPointposition (FBVector3d).
pNormalnormal direction (FBVector3d).
pSubItemIndexsub item index, -1 for whole object.

Definition at line 278 of file fbrenderer.h.

Member Data Documentation

◆ mModel

FBModel* mModel

Model picked.

Definition at line 281 of file fbrenderer.h.

◆ mNormal

FBVector3d mNormal

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

Definition at line 283 of file fbrenderer.h.

◆ mPoint

FBVector3d mPoint

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

Definition at line 282 of file fbrenderer.h.

◆ mSubItemIndex

int mSubItemIndex

Picked sub item index, -1 for whole object.

Definition at line 284 of file fbrenderer.h.


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