This reference page is linked to from the following overview topics: Updated Objects, Viewport Picking, Selection, and Manipulation.
#include <fbmodel.h>
Public Member Functions | |
bool | IsDeformable () |
Return true if the model is deformable. | |
bool | IsDrawable () |
Queries if this model should be drawn, e.g., in custom render callback. | |
int | GetVertexCount () |
Return the Vertex Count. | |
void | PushZDepthClipOverride () |
Disables Z-Depth clip plane if this model is selected using Z-Depth HideFront selection tool. | |
void | PopZDepthClipOverride () |
Re-enables Z-Depth clip plane if it had been disabled via PushZDepthClipOverride(). | |
Sub Patch Management. Each sub patch contain same type of primitives mapped with same material. | |
int | GetSubPatchCount () |
Return number of sub patches. | |
int | GetSubPatchMaterialId (int pSubPatchIndex) |
Return the mapped material for this sub patch. | |
FBMaterial * | GetSubPatchMaterial (int pSubPatchIndex) |
Return the mapped material for this sub patch. | |
FBGeometryPrimitiveType | GetSubPatchPrimitiveType (int pSubPatchIndex, bool *pIsOptimized=NULL) |
Return the primitive type for this sub patch. | |
int | GetSubPatchIndexOffset (int pSubPatchIndex) |
Return the start offset of the indexes for this sub patch (see GetIndexArray()). | |
int | GetSubPatchIndexSize (int pSubPatchIndex) |
Return the size of the indexes for this sub patch (see GetIndexArray()). | |
void | DrawSubPatch (int pSubPatchIndex, bool pWireFrame=false) |
Draw Sub Patch. | |
Sub Regions Management. Each Sub Regions are composed by one or several patches which | |
are composed with same material. | |
int | GetSubRegionCount () |
Return number of sub regions (mapping with different materials) | |
FBMaterial * | GetSubRegionMaterial (int pSubRegionIndex) |
Return sub region's material. | |
void | DrawSubRegion (int pSubRegionIndex, bool pWireFrame=false) |
Draw Sub Region. | |
Vertex Array Management | |
void | EnableOGLVertexData (bool pAfterdeform=true) |
Enable (Setup) OpenGL Vertex Array (Pos & Normal) | |
void | DisableOGLVertexData () |
Disable OpenGL Vertex Array (Pos & Normal) | |
void | VertexArrayMappingRequest () |
Request deformed vertex array mapping on CPU. | |
void | VertexArrayMappingRelease () |
Release deformed vertex array mapping on CPU. | |
const int * | GetVertexArrayDuplicationMap (unsigned int &pDuplicatedVertexCound) |
The FBModel::TessellatedMesh could contain per-face mapping UVset/Normal or other layer elements. | |
int * | GetIndexArray () |
Return Index Array. | |
unsigned int | GetIndexArrayVBOId () |
Return Index Array VBO Id. | |
FBGeometryArrayElementType | GetVertexArrayType (FBGeometryArrayID pArrayId, bool pAfterDeform=true) |
Return Vertex Array Format. | |
void * | GetVertexArray (FBGeometryArrayID pArrayId, bool pAfterDeform=true) |
Return Vertex Array Pointer. | |
unsigned int | GetVertexArrayVBOId (FBGeometryArrayID pArrayId, bool pAfterDeform=true) |
Return Vertex Buffer Object (VBO) Id for the request array. | |
void * | GetVertexArrayVBOOffset (FBGeometryArrayID pArrayId, bool pAfterDeform=true) |
Return Vertex Buffer Object (VBO) offset for the request array. | |
UVset Array Management | |
void | EnableOGLUVSet (FBTextureMapping pTextureMapping=kFBTextureMappingUV, const char *pUVSet=NULL) |
Enable (Setup) OpenGL UV Set Array. | |
void | DisableOGLUVSet () |
Disable OpenGL UV Set Array. | |
FBGeometryArrayElementType | GetUVSetArrayFormat (FBTextureMapping pTextureMapping=kFBTextureMappingUV, const char *pUVSet=NULL) |
Return UV Array Format. | |
void * | GetUVSetArray (FBTextureMapping pTextureMapping=kFBTextureMappingUV, const char *pUVSet=NULL) |
Return UV Array Pointer. | |
unsigned int | GetUVSetVBOId (FBTextureMapping pTextureMapping=kFBTextureMappingUV, const char *pUVSet=NULL) |
Return UVSet Buffer Object (VBO) Id. | |
void * | GetUVSetVBOOffset (FBTextureMapping pTextureMapping=kFBTextureMappingUV, const char *pUVSet=NULL) |
Return UVSet Buffer Object (VBO) offset. | |
Protected Member Functions | |
FBModelVertexData (FBModel *pModel) | |
Friends | |
class | DataFBModel |
FBModelVertexData | ( | FBModel * | pModel | ) | [protected] |
bool IsDeformable | ( | ) |
Return true if the model is deformable.
bool IsDrawable | ( | ) |
Queries if this model should be drawn, e.g., in custom render callback.
Returns false if e.g., deformed vertex data has not been computed for this frame(thus not ready to be drawn), or if model should be hidden when Z-Depth selection tool is active.
int GetVertexCount | ( | ) |
Return the Vertex Count.
int GetSubPatchCount | ( | ) |
Return number of sub patches.
int GetSubPatchMaterialId | ( | int | pSubPatchIndex | ) |
Return the mapped material for this sub patch.
FBMaterial* GetSubPatchMaterial | ( | int | pSubPatchIndex | ) |
Return the mapped material for this sub patch.
FBGeometryPrimitiveType GetSubPatchPrimitiveType | ( | int | pSubPatchIndex, |
bool * | pIsOptimized = NULL |
||
) |
Return the primitive type for this sub patch.
Most of the time, kFBGeometry_TRIANGLES will return.
pSubPatchIndex | Index of sub patch to be queried. |
pIsOptimized | Out parameter, return true if this sub patch is optimized for fast rendering, custom shader & render should use the optimized subpatch only |
int GetSubPatchIndexOffset | ( | int | pSubPatchIndex | ) |
Return the start offset of the indexes for this sub patch (see GetIndexArray()).
int GetSubPatchIndexSize | ( | int | pSubPatchIndex | ) |
Return the size of the indexes for this sub patch (see GetIndexArray()).
void DrawSubPatch | ( | int | pSubPatchIndex, |
bool | pWireFrame = false |
||
) |
Draw Sub Patch.
Must be called between Enable/DisableOGLVertexData function calls.
pSubPatchIndex | Index of sub region to be drawn. |
pWireFrame | draw wire frame if true. |
int GetSubRegionCount | ( | ) |
Return number of sub regions (mapping with different materials)
FBMaterial* GetSubRegionMaterial | ( | int | pSubRegionIndex | ) |
Return sub region's material.
pSubRegionIndex | Index of the sub region. |
void DrawSubRegion | ( | int | pSubRegionIndex, |
bool | pWireFrame = false |
||
) |
Draw Sub Region.
Must be called between Enable/DisableOGLVertexData function calls.
pSubRegionIndex | Index of sub region to be drawn. |
pWireFrame | draw wire frame if true. |
void PushZDepthClipOverride | ( | ) |
Disables Z-Depth clip plane if this model is selected using Z-Depth HideFront selection tool.
Call this function before drawing each model in custom render callback, so that the selected model is unaffected by the Z-Depth clip plane, and hence is visible when Z-Depth HideFront selection tool is active. Be sure to call PopZDepthClipOverride() after drawing each model.
void PopZDepthClipOverride | ( | ) |
Re-enables Z-Depth clip plane if it had been disabled via PushZDepthClipOverride().
Call this function after drawing each model in custom render callback, so that Z-Depth clip plane is re-enabled if it was earlier disabled via PushZDepthClipOverride().
void EnableOGLVertexData | ( | bool | pAfterdeform = true | ) |
Enable (Setup) OpenGL Vertex Array (Pos & Normal)
void DisableOGLVertexData | ( | ) |
Disable OpenGL Vertex Array (Pos & Normal)
void VertexArrayMappingRequest | ( | ) |
Request deformed vertex array mapping on CPU.
Model's deformation computation could be executed on GPU, and thus the deformed vertex data will reside in GPU memory only by default. Calling this function VertexArrayMappingRequest() will ensure the deformed vertex array to be always mapped to CPU memory.
void VertexArrayMappingRelease | ( | ) |
Release deformed vertex array mapping on CPU.
call this function if plugin don't need CPU access of the deformed vertex array to be mapped on CPU memory anymore, hence allow the application flexbility to choose higher performance approach.
const int* GetVertexArrayDuplicationMap | ( | unsigned int & | pDuplicatedVertexCound | ) |
The FBModel::TessellatedMesh could contain per-face mapping UVset/Normal or other layer elements.
In order to build a valid VBO buffer for accelerated rendering, those control points with multiple attribute data must be duplicated. This function return the duplicated vertexes' ID mapping from FBModel::ModelVertexData vertex array to its FBModel::TessellatedMesh vertex array. Note those duplicated vertexs are always appended after the original vertex array.
pDuplicatedVertexCound | return the count of those duplicated vertexs. |
int* GetIndexArray | ( | ) |
Return Index Array.
unsigned int GetIndexArrayVBOId | ( | ) |
Return Index Array VBO Id.
FBGeometryArrayElementType GetVertexArrayType | ( | FBGeometryArrayID | pArrayId, |
bool | pAfterDeform = true |
||
) |
Return Vertex Array Format.
pArrayId | vertex array type to return. |
pAfterDeform | return deformed vertex array type if the model is deformable, pAfterDeform is true and deformation is occurred in CPU, otherwise return original. |
void* GetVertexArray | ( | FBGeometryArrayID | pArrayId, |
bool | pAfterDeform = true |
||
) |
Return Vertex Array Pointer.
pArrayId | vertex array type to return. |
pAfterDeform | return deformed vertex array if the model is deformable, pAfterDeform is true and deformation is occurred in CPU, otherwise return original. |
unsigned int GetVertexArrayVBOId | ( | FBGeometryArrayID | pArrayId, |
bool | pAfterDeform = true |
||
) |
Return Vertex Buffer Object (VBO) Id for the request array.
pArrayId | vertex array type to return. |
pAfterDeform | return deformed vertex array VBO Id if the model is deformable, pAfterDeform is true and deformation is occurred in CPU, otherwise return original. |
void* GetVertexArrayVBOOffset | ( | FBGeometryArrayID | pArrayId, |
bool | pAfterDeform = true |
||
) |
Return Vertex Buffer Object (VBO) offset for the request array.
pArrayId | vertex array type to return. |
pAfterDeform | return deformed vertex array VBO offset if the model is deformable, pAfterDeform is true and deformation is occurred in CPU, otherwise return original. |
void EnableOGLUVSet | ( | FBTextureMapping | pTextureMapping = kFBTextureMappingUV , |
const char * | pUVSet = NULL |
||
) |
Enable (Setup) OpenGL UV Set Array.
void DisableOGLUVSet | ( | ) |
Disable OpenGL UV Set Array.
FBGeometryArrayElementType GetUVSetArrayFormat | ( | FBTextureMapping | pTextureMapping = kFBTextureMappingUV , |
const char * | pUVSet = NULL |
||
) |
Return UV Array Format.
pTextureMapping | Texture Mapping Mode. |
pUVSet | UVSet name if pTextureMapping is kFBTextureMappingUV, otherwise ignore. |
void* GetUVSetArray | ( | FBTextureMapping | pTextureMapping = kFBTextureMappingUV , |
const char * | pUVSet = NULL |
||
) |
Return UV Array Pointer.
pTextureMapping | Texture Mapping Mode. |
pUVSet | UVSet name if pTextureMapping is kFBTextureMappingUV, otherwise ignore. |
unsigned int GetUVSetVBOId | ( | FBTextureMapping | pTextureMapping = kFBTextureMappingUV , |
const char * | pUVSet = NULL |
||
) |
Return UVSet Buffer Object (VBO) Id.
pTextureMapping | Texture Mapping Mode. |
pUVSet | UVSet name if pTextureMapping is kFBTextureMappingUV, otherwise ignore. |
void* GetUVSetVBOOffset | ( | FBTextureMapping | pTextureMapping = kFBTextureMappingUV , |
const char * | pUVSet = NULL |
||
) |
Return UVSet Buffer Object (VBO) offset.
pTextureMapping | Texture Mapping Mode. |
pUVSet | UVSet name if pTextureMapping is kFBTextureMappingUV, otherwise ignore. |
friend class DataFBModel [friend] |