TBasicModifier Class Reference
[Base Classes for plugins]

Inheritance diagram for TBasicModifier:
I3DExModifier TBasicDataExchanger IMCUnknown TBasicUnknown IExDataExchanger TMCObject IMCUnknown IMCUnknown TBasicDeformModifier TBasicTreeModifier

List of all members.

Public Member Functions

 TBasicModifier ()
 ~TBasicModifier ()
virtual MCCOMErr MCCOMAPI QueryInterface (const MCIID &riid, void **ppvObj)
virtual uint32 MCCOMAPI AddRef ()
virtual void *MCCOMAPI GetExtensionDataBuffer ()
 You MUST implement this method if you have a pmap (the default returns NULL).
virtual TModifierFlags MCCOMAPI GetModifierFlags ()
virtual MCCOMErr MCCOMAPI Apply (I3DShTreeElement *tree)
virtual MicroTick MCCOMAPI GetMaxTimeWithoutComputation (I3DShTreeElement *tree)
virtual boolean MCCOMAPI IsIKTerminator (boolean &outExcludeFromChain) const
virtual MCCOMErr MCCOMAPI DeformPoint (const TVector3 &point, TVector3 &result)
virtual MCCOMErr MCCOMAPI DeformVertex3D (const TVertex3D &vertex, TVertex3D &result)
virtual MCCOMErr MCCOMAPI DeformFacetMesh (real lod, FacetMesh *in, FacetMesh **outMesh)
virtual MCCOMErr MCCOMAPI DeformBBox (const TBBox3D &in, TBBox3D &out)
virtual MCCOMErr MCCOMAPI GetNeededLOD (const real outputLOD, real &neededLod)
virtual MCCOMErr MCCOMAPI GetDeformerInfo (real lod, TDeformInfo &deformInfo)
virtual boolean MCCOMAPI ModifierChanged ()

Protected Attributes

TModifierFlags fFlags

Detailed Description

Basic Modifier class. Derive from this for a default implementation of an I3DExModifier.

See also:
I3DExModifier

Constructor & Destructor Documentation

TBasicModifier::TBasicModifier (  ) 
TBasicModifier::~TBasicModifier (  ) 

Member Function Documentation

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

Increments the reference count of the object

Reimplemented from TBasicDataExchanger.

virtual MCCOMErr MCCOMAPI TBasicModifier::Apply ( I3DShTreeElement tree  )  [virtual]

Gives access to all the parameters of the tree the modifier is on. To implement a behavior, just change the transforms.

Parameters:
tree The tree to which the modifier is applied

Implements I3DExModifier.

virtual MCCOMErr MCCOMAPI TBasicModifier::DeformBBox ( const TBBox3D in,
TBBox3D out 
) [virtual]

Returns an approximation of how the modifier affects a given zone of space contained in the box in, and returns the box that encompass the deformed space in out.

Parameters:
in The bounding box before deformation (in local coordinates)
out The bounding box after deformation (in local coordinates)
Returns:
MC_S_OK if it is implemented, MC_E_NOTIMPL if not.

Implements I3DExModifier.

virtual MCCOMErr MCCOMAPI TBasicModifier::DeformFacetMesh ( real  lod,
FacetMesh in,
FacetMesh **  outMesh 
) [virtual]

Deforms or creates 3D facets. Given the original facet mesh of a primitive, it produces a (new) deformed mesh. You can modify whatever you want on the mesh: you can add or remove vertices, normals, facets, or change their position.

But you should NOT modify the in mesh. You need to create a new mesh and return it in outMesh (yet you can clone in to outMesh and then change outMesh).

If the parameters of your deformer won't deform the mesh, you can have outMesh reference in thus:

 TMCCountedGetHelper<FacetMesh> result(outMesh); result= in;
Parameters:
lod Level of detail (LOD) of the output mesh (0 is the best quality)
in The facet mesh that needs to be deformed.
outMesh The mesh after deformation
Returns:
MC_S_OK if it is implemented, MC_E_NOTIMPL if not.

Implements I3DExModifier.

virtual MCCOMErr MCCOMAPI TBasicModifier::DeformPoint ( const TVector3 point,
TVector3 result 
) [virtual]

Computes result of the deformation of a given point (in local coordinates). DeformPoint is called by the shell if you do not implement DeformFacetMesh or DeformVertex3D (the shell will automatically subdivide the facet mesh to achieve a smooth deformation).

Parameters:
point The point that needs to be moved
result The position of the point after deformation.

Implements I3DExModifier.

virtual MCCOMErr MCCOMAPI TBasicModifier::DeformVertex3D ( const TVertex3D vertex,
TVertex3D result 
) [virtual]

Computes the result of the deformation of a given vertex (in local coordinates). DeformVertex3D called by the 3D Shell if you do not implement DeformFacetMesh (the shell will automatically subdivide the facet mesh to achieve a smooth deformation).

Parameters:
vertex The vertex that needs to be moved
result The vertex after deformation.
Returns:
MC_S_OK if it is implemented, MC_E_NOTIMPL if not.

Implements I3DExModifier.

virtual MCCOMErr MCCOMAPI TBasicModifier::GetDeformerInfo ( real  lod,
TDeformInfo deformInfo 
) [virtual]

Returns information about the modifier. If you implement only DeformPoint or DeformVertex3D and not DeformFacetMesh, use this function to give the shell some directions to guide the facet mesh subdivision process.

Parameters:
lod The level of detail
deformInfo The deformer information.

Implements I3DExModifier.

virtual void* MCCOMAPI TBasicModifier::GetExtensionDataBuffer (  )  [virtual]

You MUST implement this method if you have a pmap (the default returns NULL).

Reimplemented from TBasicDataExchanger.

virtual MicroTick MCCOMAPI TBasicModifier::GetMaxTimeWithoutComputation ( I3DShTreeElement tree  )  [virtual]

Tells the shell how much cached data the behavior has (starting at zero).

Parameters:
tree The tree to which the modifier is applied

Implements I3DExModifier.

virtual TModifierFlags MCCOMAPI TBasicModifier::GetModifierFlags (  )  [inline, virtual]

Returns the flags associated with the modifier.

Implements I3DExModifier.

virtual MCCOMErr MCCOMAPI TBasicModifier::GetNeededLOD ( const real  outputLOD,
real neededLod 
) [virtual]

Returns the level of detail the modifier needs to produce a result at the precision outputLOD.

Parameters:
outputLOD The desired output precision
neededLod The necessary input precision to get that result.

Implements I3DExModifier.

virtual boolean MCCOMAPI TBasicModifier::IsIKTerminator ( boolean outExcludeFromChain  )  const [inline, virtual]

Returns true if the modifier is an IK Terminator.

Parameters:
outExcludeFromChain Tells if the tree should be excluded from the chain.

Implements I3DExModifier.

virtual boolean MCCOMAPI TBasicModifier::ModifierChanged (  )  [inline, virtual]

Returns true if the modified needs to be updated (called by the shell when the time changed).

Implements I3DExModifier.

virtual MCCOMErr MCCOMAPI TBasicModifier::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 TBasicDataExchanger.


Member Data Documentation


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