#include <RenderNodeHandle.h>
This class describes a graphics node.
A graphics node is the container of render items. It also contains a material to shade all those render items. One render item could be added to multiple node to share the graphics data.
Public Member Functions |
|
GraphicsDriverAPI | RenderNodeHandle () |
GraphicsDriverAPI | RenderNodeHandle (const RenderNodeHandle &from) |
GraphicsDriverAPI RenderNodeHandle & |
operator= (const RenderNodeHandle &from) |
virtual GraphicsDriverAPI | ~RenderNodeHandle () |
GraphicsDriverAPI bool | Initialize () |
Initialize this graphics node. |
|
virtual
GraphicsDriverAPI const Matrix44 & |
GetWorldMatrix () const |
Returns the world matrix of this node.
|
|
GraphicsDriverAPI INode * | GetMaxNode () const |
Returns the max node. |
|
GraphicsDriverAPI bool | GetPrimaryVisibility () const |
Returns whether this node would be visible
to cameras in the scene. |
|
GraphicsDriverAPI bool | GetSecondaryVisibility () const |
Returns whether this node would appear in
rendered reflections and refractions. |
|
GraphicsDriverAPI bool | GetReceiveShadows () const |
Returns whether this node could receive
shadows. |
|
GraphicsDriverAPI bool | GetCastShadows () const |
Returns whether this node could case
shadows. |
|
GraphicsDriverAPI bool | GetNoCulling () const |
Returns whether this node should not be
culled when rendering. |
|
GraphicsDriverAPI bool | GetSelected () const |
Returns whether this node is selected.
|
|
GraphicsDriverAPI bool | GetBoxMode () const |
Returns whether this node is in bounding box
mode. |
|
GraphicsDriverAPI bool | GetBackFaceCull () const |
Returns whether back face cull is enabled on
this node. |
|
GraphicsDriverAPI DWORD | GetWireColor () const |
Returns the wire color of this node.
|
|
GraphicsDriverAPI float | GetOpacity () const |
Returns the opacity of this node. |
|
GraphicsDriverAPI size_t | GetNumberOfRenderItems () const |
Get the number of render items that this
node contains. |
|
GraphicsDriverAPI RenderItemHandle | GetRenderItem (size_t i) const |
Get the i-th render item of this node.
|
|
GraphicsDriverAPI void | AddRenderItem (const RenderItemHandle &pRenderItem) |
Add a render item to this node. |
|
GraphicsDriverAPI void | RemoveRenderItem (size_t i) |
Remove the render item with the specified
index from this node. |
|
GraphicsDriverAPI void | SetRenderItemDefaultMaterial (size_t i, const BaseMaterialHandle &hMaterial) |
Set the default material for the given
render item. |
|
GraphicsDriverAPI BaseMaterialHandle |
GetSolidMaterial () const |
Get the solid material assigned to the
current node. |
|
GraphicsDriverAPI void | SetSolidMaterial (const BaseMaterialHandle &solideMaterial) |
Set the solid material. |
|
GraphicsDriverAPI void | ClearAllRenderItems () |
Remove all render items from this node.
|
GraphicsDriverAPI RenderNodeHandle | ( | ) |
GraphicsDriverAPI RenderNodeHandle | ( | const RenderNodeHandle & | from | ) |
virtual GraphicsDriverAPI ~RenderNodeHandle | ( | ) | [virtual] |
GraphicsDriverAPI RenderNodeHandle& operator= | ( | const RenderNodeHandle & | from | ) |
GraphicsDriverAPI bool Initialize | ( | ) |
Initialize this graphics node.
virtual GraphicsDriverAPI const Matrix44& GetWorldMatrix | ( | ) | const [virtual] |
GraphicsDriverAPI INode* GetMaxNode | ( | ) | const |
GraphicsDriverAPI bool GetPrimaryVisibility | ( | ) | const |
Returns whether this node would be visible to cameras in the scene.
GraphicsDriverAPI bool GetSecondaryVisibility | ( | ) | const |
Returns whether this node would appear in rendered reflections and refractions.
GraphicsDriverAPI bool GetReceiveShadows | ( | ) | const |
Returns whether this node could receive shadows.
GraphicsDriverAPI bool GetCastShadows | ( | ) | const |
Returns whether this node could case shadows.
GraphicsDriverAPI bool GetNoCulling | ( | ) | const |
Returns whether this node should not be culled when rendering.
GraphicsDriverAPI bool GetSelected | ( | ) | const |
Returns whether this node is selected.
GraphicsDriverAPI bool GetBoxMode | ( | ) | const |
Returns whether this node is in bounding box mode.
A node is in bounding box mode means that only the bounding box of this node would be shown in the view port.
GraphicsDriverAPI bool GetBackFaceCull | ( | ) | const |
Returns whether back face cull is enabled on this node.
GraphicsDriverAPI DWORD GetWireColor | ( | ) | const |
Returns the wire color of this node.
GraphicsDriverAPI float GetOpacity | ( | ) | const |
GraphicsDriverAPI size_t GetNumberOfRenderItems | ( | ) | const |
Get the number of render items that this node contains.
GraphicsDriverAPI RenderItemHandle GetRenderItem | ( | size_t | i | ) | const |
Get the i-th render item of this node.
This function will not modify the reference count of the returned render item.
i | the index to the render item. |
GraphicsDriverAPI void AddRenderItem | ( | const RenderItemHandle & | pRenderItem | ) |
Add a render item to this node.
This function will add reference to the input render item.
pRenderItem | the render item to add. |
GraphicsDriverAPI void RemoveRenderItem | ( | size_t | i | ) |
Remove the render item with the specified index from this node.
i | the index of the render item to be removed. |
GraphicsDriverAPI void SetRenderItemDefaultMaterial | ( | size_t | i, |
const BaseMaterialHandle & | hMaterial | ||
) |
Set the default material for the given render item.
The material for a render item could be determined by three parameters:
According to this priority, the "default" material will be used, if the render item doesn't have an override material.
Different render item could has different "default" material for the same node. For example: the default material for wireframe render item could be a solid white material.
i | the index of the render item. |
hMaterial | the default material of that render item. |
GraphicsDriverAPI BaseMaterialHandle GetSolidMaterial | ( | ) | const |
Get the solid material assigned to the current node.
A custom solid material could be specified when updating per node items. This material would be passed to the inner mesh whose solid mesh render item will be assign this material.
GraphicsDriverAPI void SetSolidMaterial | ( | const BaseMaterialHandle & | solideMaterial | ) |
Set the solid material.
GraphicsDriverAPI void ClearAllRenderItems | ( | ) |
Remove all render items from this node.
Also release reference to those render items.