I3DExModifier Struct Reference
[External Interfaces]

Inheritance diagram for I3DExModifier:
IMCUnknown TBasicModifier TBasicDeformModifier TBasicTreeModifier

List of all members.

Public Member Functions

virtual TModifierFlags MCCOMAPI GetModifierFlags ()=0
virtual MCCOMErr MCCOMAPI Apply (I3DShTreeElement *tree)=0
virtual MicroTick MCCOMAPI GetMaxTimeWithoutComputation (I3DShTreeElement *tree)=0
virtual boolean MCCOMAPI IsIKTerminator (boolean &outExcludeFromChain) const =0
virtual void MCCOMAPI SetBoundingBox (const TBBox3D &bbox)=0
virtual MCCOMErr MCCOMAPI DeformPoint (const TVector3 &point, TVector3 &result)=0
virtual MCCOMErr MCCOMAPI DeformVertex3D (const TVertex3D &vertex, TVertex3D &result)=0
virtual MCCOMErr MCCOMAPI DeformFacetMesh (real lod, FacetMesh *in, FacetMesh **outMesh)=0
virtual MCCOMErr MCCOMAPI DeformBBox (const TBBox3D &in, TBBox3D &out)=0
virtual MCCOMErr MCCOMAPI GetNeededLOD (const real outputLOD, real &neededLod)=0
virtual MCCOMErr MCCOMAPI GetDeformerInfo (real lod, TDeformInfo &deformInfo)=0
virtual void MCCOMAPI BeginRendering ()
virtual void MCCOMAPI EndRendering ()
virtual boolean MCCOMAPI ModifierChanged ()=0

Detailed Description

The I3DExModifier Interface is used to apply modifiers to any object or group of objects of the scene, that is any tree except the universe. They can affect the transform of the tree (position and scaling) and the geometry of the objects that belong to the tree.

For modifiers that change the geometry, you need to implement SetBoundingBox, and either DeformPoint or DeformFacetMesh. If you choose to implement DeformPoint, the application will subdivide the object's mesh. Implementing GetDeformerInfo enables you to "guide" the subdivision process. If you don't implement DeformVertex3D a default implementation will be used.


Member Function Documentation

virtual MCCOMErr MCCOMAPI I3DExModifier::Apply ( I3DShTreeElement tree  )  [pure 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

Implemented in TBasicModifier.

virtual void MCCOMAPI I3DExModifier::BeginRendering (  )  [inline, virtual]

Is called just before a rendering

virtual MCCOMErr MCCOMAPI I3DExModifier::DeformBBox ( const TBBox3D in,
TBBox3D out 
) [pure 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.

Implemented in TBasicModifier.

virtual MCCOMErr MCCOMAPI I3DExModifier::DeformFacetMesh ( real  lod,
FacetMesh in,
FacetMesh **  outMesh 
) [pure 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.

Implemented in TBasicModifier.

virtual MCCOMErr MCCOMAPI I3DExModifier::DeformPoint ( const TVector3 point,
TVector3 result 
) [pure 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.

Implemented in TBasicModifier.

virtual MCCOMErr MCCOMAPI I3DExModifier::DeformVertex3D ( const TVertex3D vertex,
TVertex3D result 
) [pure 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.

Implemented in TBasicModifier.

virtual void MCCOMAPI I3DExModifier::EndRendering (  )  [inline, virtual]

Is called just after a rendering

virtual MCCOMErr MCCOMAPI I3DExModifier::GetDeformerInfo ( real  lod,
TDeformInfo deformInfo 
) [pure 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.

Implemented in TBasicModifier.

virtual MicroTick MCCOMAPI I3DExModifier::GetMaxTimeWithoutComputation ( I3DShTreeElement tree  )  [pure virtual]

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

Parameters:
tree The tree to which the modifier is applied

Implemented in TBasicModifier.

virtual TModifierFlags MCCOMAPI I3DExModifier::GetModifierFlags (  )  [pure virtual]

Returns the flags associated with the modifier.

Implemented in TBasicModifier.

virtual MCCOMErr MCCOMAPI I3DExModifier::GetNeededLOD ( const real  outputLOD,
real neededLod 
) [pure 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.

Implemented in TBasicModifier.

virtual boolean MCCOMAPI I3DExModifier::IsIKTerminator ( boolean outExcludeFromChain  )  const [pure virtual]

Returns true if the modifier is an IK Terminator.

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

Implemented in TBasicModifier.

virtual boolean MCCOMAPI I3DExModifier::ModifierChanged (  )  [pure virtual]

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

Implemented in TBasicModifier.

virtual void MCCOMAPI I3DExModifier::SetBoundingBox ( const TBBox3D bbox  )  [pure virtual]

Is called by the 3D Shell to tell the 3D deformation modifier in which boundaries the 3D data to deform is going to be. This is the bounding box of the facet mesh before the deformation is applied.

Parameters:
bbox The Bounding Box

Implemented in TBasicTreeModifier.


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