This reference page is linked to from the following overview topics: About RenderItem.
#include
<GenerateMeshRenderItemsContext.h>
This class contains all information that will be passed to Mesh::GenerateRenderItems() or MNMesh::GenerateRenderItems() to update its display data.
All the value of this class are set by system and plugin developers should build render items to satisfy those requirements.
Public Member Functions |
|
GraphicsDriverAPI | GenerateMeshRenderItemsContext () |
GraphicsDriverAPI | ~GenerateMeshRenderItemsContext () |
GraphicsDriverAPI const MaterialRequiredStreams & |
GetRequiredStreams () const |
Get the required streams. |
|
GraphicsDriverAPI MaterialRequiredStreams & |
GetRequiredStreams () |
Get the required streams. |
|
GraphicsDriverAPI size_t | GetNumMeshElementDescriptions () const |
Get the count of mesh element descriptions
required to be generated from the given mesh. |
|
GraphicsDriverAPI const MeshElementDescription & |
GetMeshElementDescription (size_t i) const |
Get the i-th mesh element description.
|
|
GraphicsDriverAPI const MeshElementDescription * |
FindMeshElementDescription (unsigned long descriptionBits) const |
Find the mesh element description based on
the given descriptionBits. |
|
GraphicsDriverAPI const MeshElementDescription * |
FindMeshElementDescription (MeshElementType type, MeshPart part) const |
Find the mesh element description based on
the given type and mesh part. |
|
GraphicsDriverAPI void | AddMeshElementDescription (const MeshElementDescription &meshElementDescription) |
Add a new mesh element description. |
|
GraphicsDriverAPI void | AddBuiltInMeshElementDescription (BuiltInMeshElementDescription type) |
Add a built-in mesh element description.
|
|
GraphicsDriverAPI void | ClearMeshElementDescriptions () |
Clear all mesh element descriptions.
|
|
GraphicsDriverAPI void | GenerateDefaultMeshElementDescriptions (unsigned long objectComponentRequirements) |
Developer may simply call this function when
objectComponentRequirements contains the requirements for all the
render items that require to be generated. |
|
GraphicsDriverAPI void | GenerateDefaultContext (const UpdateDisplayContext &updateDisplayContext) |
Developer may simply call this function when
updateDisplayContext contains the requirements for all render items
and material streams to be generated. |
|
GraphicsDriverAPI void | RemoveInvisibleMeshElementDescriptions (const RenderNodeHandle &hRenderNode) |
There are some render items which are
invisible in a max node by default with regard to the current state
of this node. |
|
Protected Attributes |
|
MaxSDK::Array < MeshElementDescription > |
mMeshElementsDescriptions |
MaterialRequiredStreams | mRequiredStreams |
GraphicsDriverAPI GenerateMeshRenderItemsContext | ( | ) |
GraphicsDriverAPI ~GenerateMeshRenderItemsContext | ( | ) |
GraphicsDriverAPI const MaterialRequiredStreams& GetRequiredStreams | ( | ) | const |
Get the required streams.
Required streams is for generating mesh render items.
GraphicsDriverAPI MaterialRequiredStreams& GetRequiredStreams | ( | ) |
Get the required streams.
Required streams is for generating mesh render items.
GraphicsDriverAPI size_t GetNumMeshElementDescriptions | ( | ) | const |
Get the count of mesh element descriptions required to be generated from the given mesh.
GraphicsDriverAPI const MeshElementDescription& GetMeshElementDescription | ( | size_t | i | ) | const |
Get the i-th mesh element description.
[in] | i | the index of the mesh element description |
GraphicsDriverAPI const MeshElementDescription* FindMeshElementDescription | ( | unsigned long | descriptionBits | ) | const |
Find the mesh element description based on the given descriptionBits.
[in] | descriptionBits | the description bits of the mesh element description |
GraphicsDriverAPI const MeshElementDescription* FindMeshElementDescription | ( | MeshElementType | type, |
MeshPart | part | ||
) | const |
Find the mesh element description based on the given type and mesh part.
[in] | type | mesh element type |
[in] | part | mesh part |
GraphicsDriverAPI void AddMeshElementDescription | ( | const MeshElementDescription & | meshElementDescription | ) |
Add a new mesh element description.
[in] | meshElementDescription | the new mesh element description. |
GraphicsDriverAPI void AddBuiltInMeshElementDescription | ( | BuiltInMeshElementDescription | type | ) |
Add a built-in mesh element description.
[in] | type | the type of built-in mesh element description |
GraphicsDriverAPI void ClearMeshElementDescriptions | ( | ) |
Clear all mesh element descriptions.
GraphicsDriverAPI void GenerateDefaultMeshElementDescriptions | ( | unsigned long | objectComponentRequirements | ) |
Developer may simply call this function when objectComponentRequirements contains the requirements for all the render items that require to be generated.
[in] | objectComponentRequirements | the object component requirements from the update display context. |
GraphicsDriverAPI void GenerateDefaultContext | ( | const UpdateDisplayContext & | updateDisplayContext | ) |
Developer may simply call this function when updateDisplayContext contains the requirements for all render items and material streams to be generated.
[in] | updateDisplayContext | the update display context |
GraphicsDriverAPI void RemoveInvisibleMeshElementDescriptions | ( | const RenderNodeHandle & | hRenderNode | ) |
There are some render items which are invisible in a max node by default with regard to the current state of this node.
For e.g., selected edges is not visible in an unselected node or digonals is not visible in a node whose 'Edge Only' property is true, etc. Developers may call this function to remove the descriptions of those invisible render items of a given node.
[in] | hRenderNode | the render node for which invisible descriptions will be removed |
MaxSDK::Array<MeshElementDescription>
mMeshElementsDescriptions [protected] |