TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
iPainterDrawSet Struct Referenceabstract
Inheritance diagram for iPainterDrawSet:
iUnknown

Detailed Description

Painter draw set.

General

virtual iPainterGetPainter () const =0
 Get the parent painter object. {Property}. More...
 

Lights

virtual tPainterLightCVecGetLights () const =0
 Get the lights influencing the draw set. {Property}. More...
 
virtual ni::tBool SortLights ()=0
 Sort the lights. More...
 
virtual void SetNumVisibleLights (ni::tU32 anNumVisible)=0
 Set the number of visible lights. {Property}. More...
 
virtual ni::tU32 GetNumVisibleLights () const =0
 Get the number of visible lights. {Property}. More...
 

Camera

virtual ni::tBool SetCamera (iFrustum *apFrustum, const sVec3f &avPosition)=0
 Set the camera frustum. More...
 
virtual iFrustumGetCameraFrustum () const =0
 Get the camera frustum set. {Property}. More...
 
virtual sVec3f GetCameraPosition () const =0
 Get the camera position set. {Property}. More...
 
virtual void SetSort (ePainterDrawSetSort aSort)=0
 Set the object sorting criteria. More...
 
virtual ePainterDrawSetSort GetSort () const =0
 Get the object sorting cirteria. {Property}. More...
 

Objects

virtual void ClearObjects ()=0
 Remove all painter objects in the set. More...
 
virtual ni::tBool SetObject (iPainterObject *apObject)=0
 Set a painter object to its channels. More...
 
virtual ni::tU32 RemoveObject (iPainterObject *apObject)=0
 Remove a painter object from all the channels. More...
 
virtual tPainterObjectCVecGetChannelObjects (ePainterChannel aChannel) const =0
 Get the specified channel's objects. {Property}. More...
 
virtual ni::tU32 ComputeBoundingVolume (const tPainterObjectCVec *apObjects, ni::iBoundingVolume *apBV) const =0
 Compute the bounding volume of the objects in the specified channel object list. More...
 

Visibility Test

virtual void SetVisibilityTest (ni::tBool abEnabled)=0
 Set whether visibility test is enabled. More...
 
virtual ni::tBool GetVisibilityTest () const =0
 Get whether visibility test is enabled. {Property}. More...
 
virtual ni::tBool SetVisibilityTestSink (iPainterVisibilityTestSink *apSink)=0
 Set the visibility test sink. {Property}. More...
 
virtual
iPainterVisibilityTestSink
GetVisibilityTestSink () const =0
 Get the visibility test sink. {Property}. More...
 
virtual tU32 GetNumVisibleObjects () const =0
 Get the number of visible objects in the set. {Property}. More...
 
virtual tPainterObjectCVecGetVisibleObjects () const =0
 Get the visible objects list. More...
 
virtual void MakeVisible (iPainterObject *apObject, ni::tBool abCull)=0
 Make an object visible. More...
 
virtual ni::tU32 RenderOcclusion (iPainterRenderContext *apRC, iPainterObject *apObject)=0
 Render the occlusion depth mesh of the specified object. More...
 
virtual ni::tBool TestVisibility (iPainterRenderContext *apRC, tPainterObjectCVec *apTestObjects, ni::tU32 anObjectCount)=0
 Do the visibility test using the visibility test sink. More...
 

Rendering

virtual ni::tU32 RenderPass (iPainterRenderContext *apRC, ePainterChannel aChannel, ePainterRenderMode aMode)=0
 Render the specified pass. More...
 
virtual ePainterChannel GetRenderPassChannel () const =0
 Get the last render pass's channel. {Property}. More...
 
virtual ePainterRenderMode GetRenderPassMode () const =0
 Get the last render pass's render mode. {Property}. More...
 

Additional Inherited Members

- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual iPainter* GetPainter ( ) const
pure virtual

Get the parent painter object. {Property}.

virtual tPainterLightCVec* GetLights ( ) const
pure virtual

Get the lights influencing the draw set. {Property}.

virtual ni::tBool SortLights ( )
pure virtual

Sort the lights.

Remarks
The lights are sorted by culled status (not culled first), then by light type.
The paint function does this automatically when preparing the lights.
virtual void SetNumVisibleLights ( ni::tU32  anNumVisible)
pure virtual

Set the number of visible lights. {Property}.

Remarks
Set automatically by iPainter::PaintDrawSetPrepareLights
Set to eInvalidHandle if the render path doesnt do any light rendering.
virtual ni::tU32 GetNumVisibleLights ( ) const
pure virtual

Get the number of visible lights. {Property}.

virtual ni::tBool SetCamera ( iFrustum apFrustum,
const sVec3f avPosition 
)
pure virtual

Set the camera frustum.

Parameters
apFrustumthe camera's frustum.
avPositionthe camera's eye position in world space.
abPlanarSort,iftrue the objects are sorted by their distance with the camera's frustum near plane, else they are sorted by their distance with the camera's eye position. Orthographic, or orthographic like rendering should use PlanarSort, most rendering of fixed UI qualifiy.
Remarks
No rendering is done if no valid camera is set.
virtual iFrustum* GetCameraFrustum ( ) const
pure virtual

Get the camera frustum set. {Property}.

virtual sVec3f GetCameraPosition ( ) const
pure virtual

Get the camera position set. {Property}.

virtual void SetSort ( ePainterDrawSetSort  aSort)
pure virtual

Set the object sorting criteria.

Remarks
The default is ePainterDrawSetSort_Eye. {Property}
virtual ePainterDrawSetSort GetSort ( ) const
pure virtual

Get the object sorting cirteria. {Property}.

virtual void ClearObjects ( )
pure virtual

Remove all painter objects in the set.

virtual ni::tBool SetObject ( iPainterObject apObject)
pure virtual

Set a painter object to its channels.

virtual ni::tU32 RemoveObject ( iPainterObject apObject)
pure virtual

Remove a painter object from all the channels.

virtual tPainterObjectCVec* GetChannelObjects ( ePainterChannel  aChannel) const
pure virtual

Get the specified channel's objects. {Property}.

virtual ni::tU32 ComputeBoundingVolume ( const tPainterObjectCVec apObjects,
ni::iBoundingVolume apBV 
) const
pure virtual

Compute the bounding volume of the objects in the specified channel object list.

Returns
The number of objects added to the specified bounding volume.
virtual void SetVisibilityTest ( ni::tBool  abEnabled)
pure virtual

Set whether visibility test is enabled.

Remarks
If visibility test is enabled the VisibleObjects array is used for regular objects.
The visibility testing method should call ClearVisibleObjects each time a new
visibility test is made, and MakeVisibile called for each painter object found visible.
The visibility test method should use RenderOcclusion to render the occlusion depth mesh.
{Property}
virtual ni::tBool GetVisibilityTest ( ) const
pure virtual

Get whether visibility test is enabled. {Property}.

virtual ni::tBool SetVisibilityTestSink ( iPainterVisibilityTestSink apSink)
pure virtual

Set the visibility test sink. {Property}.

virtual iPainterVisibilityTestSink* GetVisibilityTestSink ( ) const
pure virtual

Get the visibility test sink. {Property}.

virtual tU32 GetNumVisibleObjects ( ) const
pure virtual

Get the number of visible objects in the set. {Property}.

Remarks
This specifies the number of objects visible in the 'Visible' painter channel.
If visibility test is not enabled returns the number of 'Regular' objects.
virtual tPainterObjectCVec* GetVisibleObjects ( ) const
pure virtual

Get the visible objects list.

Remarks
If visibility test is not enabled returns the number of 'Regular' channel.
virtual void MakeVisible ( iPainterObject apObject,
ni::tBool  abCull 
)
pure virtual

Make an object visible.

virtual ni::tU32 RenderOcclusion ( iPainterRenderContext apRC,
iPainterObject apObject 
)
pure virtual

Render the occlusion depth mesh of the specified object.

virtual ni::tBool TestVisibility ( iPainterRenderContext apRC,
tPainterObjectCVec apTestObjects,
ni::tU32  anObjectCount 
)
pure virtual

Do the visibility test using the visibility test sink.

Parameters
apRC
apTestObjectsspecify an optional vector of objects to use for the visibility test, this will override the default behavior which is to use the regular channel.
anObjectCount
Returns
eFalse if the visibility test failed, eTrue if it succeded.
Remarks
If not visibility test sink is set a simple frustum test is done.
virtual ni::tU32 RenderPass ( iPainterRenderContext apRC,
ePainterChannel  aChannel,
ePainterRenderMode  aMode 
)
pure virtual

Render the specified pass.

virtual ePainterChannel GetRenderPassChannel ( ) const
pure virtual

Get the last render pass's channel. {Property}.

virtual ePainterRenderMode GetRenderPassMode ( ) const
pure virtual

Get the last render pass's render mode. {Property}.