MeshElementDescription Class Reference
 
 
 
MeshElementDescription Class Reference

#include <MeshElementDescription.h>

Inheritance diagram for MeshElementDescription:
MaxHeapOperators

Class Description

This class describes a single mesh element(which corresponds to a render item) required to be generated by calling Mesh::GenerateRenderItems() or MNMesh::GenerateRenderItems() from the specified mesh(or mnmesh).

Public Member Functions

GraphicsDriverAPI  MeshElementDescription ()
GraphicsDriverAPI  MeshElementDescription (unsigned long descriptionBits)
GraphicsDriverAPI  ~MeshElementDescription ()
GraphicsDriverAPI  MeshElementDescription (const MeshElementDescription &from)
GraphicsDriverAPI
MeshElementDescription
operator= (const MeshElementDescription &from)
GraphicsDriverAPI MeshElementType  GetMeshElementType () const
  Get the type of this mesh element.
GraphicsDriverAPI void  SetMeshElementType (MeshElementType type)
  Set the type of this mesh element.
GraphicsDriverAPI MeshPart  GetMeshPart () const
  Get the part of this mesh element.
GraphicsDriverAPI void  SetMeshPart (MeshPart meshPart)
  Set the part of this mesh element.
GraphicsDriverAPI void  SetUseSoftSelectionColor (bool onOff)
  Specify whether to shade the mesh element in soft selection color.
GraphicsDriverAPI bool  GetUseSoftSelectionColor () const
  Get whether to shade the mesh element in soft selection color.
GraphicsDriverAPI bool  GetBackfaceCull () const
  Get whether the mesh element requires its back faces to be culled.
GraphicsDriverAPI void  SetBackfaceCull (bool onOff)
  Specify whether the mesh element requires its back faces to be culled.
GraphicsDriverAPI unsigned long  GetDescriptionBits () const
  Get the description bits of this element description.

Constructor & Destructor Documentation

GraphicsDriverAPI MeshElementDescription ( )
GraphicsDriverAPI MeshElementDescription ( unsigned long  descriptionBits )
GraphicsDriverAPI ~MeshElementDescription ( )
GraphicsDriverAPI MeshElementDescription ( const MeshElementDescription from )

Member Function Documentation

GraphicsDriverAPI MeshElementDescription& operator= ( const MeshElementDescription from )
GraphicsDriverAPI MeshElementType GetMeshElementType ( ) const

Get the type of this mesh element.

Returns:
the mesh element type.
GraphicsDriverAPI void SetMeshElementType ( MeshElementType  type )

Set the type of this mesh element.

Parameters:
type The specified mesh element type.
GraphicsDriverAPI MeshPart GetMeshPart ( ) const

Get the part of this mesh element.

Returns:
the mesh part.
GraphicsDriverAPI void SetMeshPart ( MeshPart  meshPart )

Set the part of this mesh element.

Parameters:
meshPart The specified mesh part.
GraphicsDriverAPI void SetUseSoftSelectionColor ( bool  onOff )

Specify whether to shade the mesh element in soft selection color.

Turn on this option when an mesh element is displayed in any sub-object level using soft selection

Parameters:
onOff True to enable and false to disable.
Remarks:
this option has no effect an a mesh element whose MeshPart is MeshPartSelected. The selected edge/diagonal/face mesh element will always be shaded in red. For the vertex ticks mesh element, when this option "on" its selected vertices will be displayed in red while the unselected ones will be shaded in soft selection color. And when "off", all vertices will be shaded in soft selection color.
GraphicsDriverAPI bool GetUseSoftSelectionColor ( ) const

Get whether to shade the mesh element in soft selection color.

Returns:
true if shaded in soft selection color or false otherwise.
GraphicsDriverAPI bool GetBackfaceCull ( ) const

Get whether the mesh element requires its back faces to be culled.

Returns:
whether to cull the back face.
GraphicsDriverAPI void SetBackfaceCull ( bool  onOff )

Specify whether the mesh element requires its back faces to be culled.

Parameters:
onOff whether to cull the back face.
GraphicsDriverAPI unsigned long GetDescriptionBits ( ) const

Get the description bits of this element description.

This value is a combination of all member values on bit base and corresponds to a specific type of mesh element description. Developers may use it to query a render item from an IRenderItemContainer.

Returns:
the description bits corresponding to this element description