TCountedRenderable Class Reference
[Data Structures]

Inheritance diagram for TCountedRenderable:
TMCSMPCountedObject I3DShRenderable IMCUnknown IMCUnknown TBitMapRenderable TInstanceRenderable TRenderableHelper TSimpleShapeRenderable TPointMeshRenderable TSegmentMeshRenderable

List of all members.

Public Member Functions

 TCountedRenderable ()
 ~TCountedRenderable ()
virtual MCCOMErr MCCOMAPI QueryInterface (const MCIID &riid, void **ppvObj)
virtual uint32 MCCOMAPI AddRef ()
virtual uint32 MCCOMAPI Release ()
virtual I3DShRenderable::EType
MCCOMAPI 
GetGeometryType () const
virtual const TPointMesh *MCCOMAPI GetPointMesh () const
virtual const TSegmentMesh
*MCCOMAPI 
GetSegmentMesh () const
virtual MCCOMErr MCCOMAPI GetFMesh (real lod, FacetMesh **amesh)
virtual const TMCPixelBucket
*MCCOMAPI 
GetPixelBucket (TMCRect &rect) const
virtual TRenderableFlags MCCOMAPI GetRenderableFlags (void) const
virtual MCCOMErr MCCOMAPI SetRenderableFlags (const TRenderableFlags flags)
virtual void MCCOMAPI SetFinalRenderingFlag (boolean finalRendering)
virtual MCCOMErr MCCOMAPI GetShadingApproximation (TShadingApproximation &shadingApprox, uint32 uvSpaceID) const
virtual MCCOMErr MCCOMAPI GetFlatennedTexturesAsync (uint32 uvSpaceID, UVMaps &maps, TextureAvailableProc proc, void *privData, TMCRealRect *range=nil) const
virtual void MCCOMAPI GetBoundingBox (TBBox3D &bb)
virtual uint32 MCCOMAPI GetUVSpaceCount ()
virtual MCCOMErr MCCOMAPI GetInstance (I3DShInstance **instance)
virtual ELODParamType MCCOMAPI GetLODParamType () const
virtual boolean MCCOMAPI GetRecommendedTextureSize (uint32 uvSpaceID, uint32 channelIndex, uint32 &width, uint32 &height) const
 Calculate the intrinsic appropriate texture size.
virtual void MCCOMAPI GetRelevantTextureBucketCache (uint32 uvSpaceID, uint32 channelIndex, boolean allowMultiplierModification, IShTextureMapBucketCache **outTextureMapFile) const
 Get the texture map file associated to the specified shading domain.

Protected Member Functions

virtual MCCOMErr MCCOMAPI SelfGetShadingApproximation (TShadingApproximation &shadingApprox, uint32 uvSpaceID) const
virtual MCCOMErr MCCOMAPI SelfGetFlatennedTexturesAsync (uint32 uvSpaceID, UVMaps &maps, TextureAvailableProc proc, void *privData, TMCRealRect *range=nil) const

Detailed Description

Class used to pass geometry/rendering data to the renderer. Note that the GetBoundingBox function must always return a valid bounding box, so that the renderer can optimize properly. The TCountedRenderable supplies one kind of geometry (I3DShRenderable::EType) to the renderer, along with flags describing how to render the geometry.

See also:
I3DShRenderable

Constructor & Destructor Documentation

TCountedRenderable::TCountedRenderable (  ) 
TCountedRenderable::~TCountedRenderable (  ) 

Member Function Documentation

virtual uint32 MCCOMAPI TCountedRenderable::AddRef (  )  [inline, virtual]

Increments the reference count of the object

Reimplemented from TMCSMPCountedObject.

virtual void MCCOMAPI TCountedRenderable::GetBoundingBox ( TBBox3D bb  )  [virtual]

Returns the bounding box of the renderable in local coordinates (for triangle meshes).

Parameters:
bb The bounding box that is returned.

Implements I3DShRenderable.

Reimplemented in TRenderableHelper, TSimpleShapeRenderable, and TInstanceRenderable.

virtual MCCOMErr MCCOMAPI TCountedRenderable::GetFlatennedTexturesAsync ( uint32  uvSpaceID,
UVMaps maps,
TextureAvailableProc  proc,
void *  privData,
TMCRealRect range = nil 
) const [virtual]

Calculates a set of texture maps that approximates the shading on the instance.

Parameters:
uvSpaceID The shading domain index.
maps The maps that are returned.
proc A callback function called when the texture is available.
privData Data passed by the callback.
range A rectangle in the texture coordinates. (NULL if the whole uvspace is required).

Implements I3DShRenderable.

virtual MCCOMErr MCCOMAPI TCountedRenderable::GetFMesh ( real  lod,
FacetMesh **  amesh 
) [virtual]

Returns a pointer to the triangle mesh contained in this renderable (see GetGeometryType()).

Parameters:
lod The lod that is requested.
amesh A pointer to the mesh that is returned.

Implements I3DShRenderable.

Reimplemented in TSimpleShapeRenderable, and TInstanceRenderable.

virtual I3DShRenderable::EType MCCOMAPI TCountedRenderable::GetGeometryType (  )  const [virtual]

Returns the type of geometry that should be rendered (points, segments or triangles...)

Implements I3DShRenderable.

Reimplemented in TRenderableHelper, TPointMeshRenderable, TSegmentMeshRenderable, TBitMapRenderable, TSimpleShapeRenderable, and TInstanceRenderable.

virtual MCCOMErr MCCOMAPI TCountedRenderable::GetInstance ( I3DShInstance **  instance  )  [virtual]

Returns a pointer to the instance that corresponds to the renderable. Note that it can be NULL if the renderable has no instance

Parameters:
instance A pointer to the instance.

Implements I3DShRenderable.

Reimplemented in TInstanceRenderable.

virtual ELODParamType MCCOMAPI TCountedRenderable::GetLODParamType (  )  const [virtual]
Returns:
The type of information used to calculate the appropriate LOD

Implements I3DShRenderable.

Reimplemented in TInstanceRenderable.

virtual const TMCPixelBucket* MCCOMAPI TCountedRenderable::GetPixelBucket ( TMCRect rect  )  const [virtual]

Returns a pointer to the pixel bucket contained by the renderable. Returns NULL if the renderable is not a 2D image (see GetGeometryType()).

Implements I3DShRenderable.

Reimplemented in TBitMapRenderable.

virtual const TPointMesh* MCCOMAPI TCountedRenderable::GetPointMesh (  )  const [virtual]

Returns a pointer to the point mesh contained in this renderable. Returns NULL if the renderable is not a point mesh (see GetGeometryType()).

Implements I3DShRenderable.

Reimplemented in TPointMeshRenderable, and TSimpleShapeRenderable.

virtual boolean MCCOMAPI TCountedRenderable::GetRecommendedTextureSize ( uint32  uvSpaceID,
uint32  channelIndex,
uint32 width,
uint32 height 
) const [virtual]

Calculate the intrinsic appropriate texture size.

Implements I3DShRenderable.

Reimplemented in TInstanceRenderable.

virtual void MCCOMAPI TCountedRenderable::GetRelevantTextureBucketCache ( uint32  uvSpaceID,
uint32  channelIndex,
boolean  allowMultiplierModification,
IShTextureMapBucketCache **  outTextureMapFile 
) const [virtual]

Get the texture map file associated to the specified shading domain.

Implements I3DShRenderable.

Reimplemented in TInstanceRenderable.

virtual TRenderableFlags MCCOMAPI TCountedRenderable::GetRenderableFlags ( void   )  const [virtual]

Returns the flags associated with this renderable. See TRenderableFlags for more info.

Implements I3DShRenderable.

Reimplemented in TRenderableHelper, TSimpleShapeRenderable, and TInstanceRenderable.

virtual const TSegmentMesh* MCCOMAPI TCountedRenderable::GetSegmentMesh (  )  const [virtual]

Returns a pointer to the segment mesh contained in this renderable. Returns NULL if the renderable is not a segment mesh (see GetGeometryType()).

Implements I3DShRenderable.

Reimplemented in TSegmentMeshRenderable, and TSimpleShapeRenderable.

virtual MCCOMErr MCCOMAPI TCountedRenderable::GetShadingApproximation ( TShadingApproximation shadingApprox,
uint32  uvSpaceID 
) const [virtual]

Returns an approximation of the shading that can be used for interactive rendering.

Parameters:
shadingApprox The color of the shader.
uvSpaceID The UVSpaceID for which the approximation is required.

Implements I3DShRenderable.

virtual uint32 MCCOMAPI TCountedRenderable::GetUVSpaceCount (  )  [virtual]

Returns the number of shading domaine (uv space) on the primitive.

Implements I3DShRenderable.

Reimplemented in TInstanceRenderable.

virtual MCCOMErr MCCOMAPI TCountedRenderable::QueryInterface ( const MCIID riid,
void **  ppvObj 
) [virtual]

Check if the object supports a given interface and returns a pointer to that interface if it does. Note that QueryInterface will increment the reference count of the object by one if the interface is found.

Parameters:
riid GUID of the interface
ppvObj A pointer to the pointer being returned.

Reimplemented from TMCSMPCountedObject.

virtual uint32 MCCOMAPI TCountedRenderable::Release (  )  [inline, virtual]

Decrements the reference count of the object. If the reference count reaches zero, the object is destroyed.

Reimplemented from TMCSMPCountedObject.

virtual MCCOMErr MCCOMAPI TCountedRenderable::SelfGetFlatennedTexturesAsync ( uint32  uvSpaceID,
UVMaps maps,
TextureAvailableProc  proc,
void *  privData,
TMCRealRect range = nil 
) const [protected, virtual]

Reimplemented in TInstanceRenderable.

virtual MCCOMErr MCCOMAPI TCountedRenderable::SelfGetShadingApproximation ( TShadingApproximation shadingApprox,
uint32  uvSpaceID 
) const [protected, virtual]
virtual void MCCOMAPI TCountedRenderable::SetFinalRenderingFlag ( boolean  finalRendering  )  [inline, virtual]
Parameters:
finalRendering True if the renderaable is used for final rendering.

Implements I3DShRenderable.

virtual MCCOMErr MCCOMAPI TCountedRenderable::SetRenderableFlags ( const TRenderableFlags  flags  )  [virtual]

Sets the flags associated with this renderable.

Parameters:
flags The flags.

Implements I3DShRenderable.

Reimplemented in TSimpleShapeRenderable, and TInstanceRenderable.


The documentation for this class was generated from the following file:
Generated on Mon Apr 26 22:48:00 2010 for Carrara SDK Doc by  doxygen 1.6.3