I3DShInstance Struct Reference
[Shell Interfaces]

Inheritance diagram for I3DShInstance:

IMCUnknown List of all members.

Public Types

enum  EInstanceKind {
  kPrimitiveInstance = 1, kSceneInstance = 2, kCameraInstance = 3, kLightInstance = 4,
  kInstanceKind_Max = 0x7fffffff
}
 These are the constants returned from GetInstanceKind(). More...

Public Member Functions

virtual MCCOMErr MCCOMAPI Get3DObject (I3DShObject **object)=0
virtual MCCOMErr MCCOMAPI Set3DObject (I3DShObject *object)=0
virtual MCCOMErr MCCOMAPI SetShader (I3DShMasterShader *masterShader)=0
virtual MCCOMErr MCCOMAPI GetShader (I3DShMasterShader **masterShader)=0
virtual boolean MCCOMAPI UsesDefaultShader ()=0
virtual uint32 MCCOMAPI GetUVSpaceCount ()=0
virtual MCCOMErr MCCOMAPI GetUVSpace (uint32 uvSpaceID, UVSpaceInfo *uvSpaceInfo)=0
virtual MCCOMErr MCCOMAPI GetShadingFlags (ShadingFlags &theFlags)=0
virtual void MCCOMAPI ShadeAndLight (LightingDetail &result, const LightingContext &lightingContext)=0
virtual MCCOMErr MCCOMAPI DoShade (ShadingOut &shadingOut, ShadingIn &shadingIn)=0
virtual MCCOMErr MCCOMAPI GetBump (TVector3 &result, ShadingIn &shadingIn)=0
virtual MCCOMErr MCCOMAPI GetMainColors (TMCColorRGBA &color1, TMCColorRGBA &color2)=0
virtual MCCOMErr MCCOMAPI ShaderModified ()=0
virtual MCCOMErr MCCOMAPI GetFlatennedTexturesSync (uint32 uvSpaceID, UVMaps &maps, boolean wantsProgress, TMCRealRect *range=nil) const =0
virtual MCCOMErr MCCOMAPI GetFlatennedTexturesAsync (uint32 uvSpaceID, UVMaps &maps, TextureAvailableProc proc, void *privData, TMCRealRect *range=nil) const =0
virtual MCCOMErr MCCOMAPI FlushFlatennedTextureCaches ()=0
virtual MCCOMErr MCCOMAPI SetShadingFromMaps (uint32 uvSpaceID, UVMaps &maps, MapParams *mapParams, TMCRealRect *range=nil)=0
virtual void MCCOMAPI GetBoundingBox (TBBox3D &bbox, ETreeDeformBBoxModes deformMode)=0
virtual void MCCOMAPI GetFacetBoundingBox (TBBox3D &bbox, ETreeDeformBBoxModes deformMode, TMatrix33 &mappingTransform, void *listener, uint32 matrixChangedPhase)=0
virtual MCCOMErr MCCOMAPI Dehydrate (int16 level)=0
virtual boolean MCCOMAPI RayHit (RayHitParameters &param)=0
virtual boolean MCCOMAPI RayHitFacet (RayHitParameters &params, uint32 facetIndex, real lod)=0
virtual MCCOMErr MCCOMAPI GetDeformed3DObject (I3DShObject **object)=0
virtual MCCOMErr MCCOMAPI GetURL (TMCString &name, int16 &kind)=0
virtual MCCOMErr MCCOMAPI SetURL (const TMCString &name, int16 kind)=0
virtual int32 MCCOMAPI GetClassSignature ()=0
virtual int32 MCCOMAPI GetInstanceKind ()=0
virtual boolean MCCOMAPI IsVolumeInstance ()=0
virtual MCCOMErr MCCOMAPI GetFMesh (real lod, FacetMesh **mesh)=0
virtual MCCOMErr MCCOMAPI GetIndex (int32 &index)=0
virtual MCCOMErr MCCOMAPI GetVertexUV (boolean &res, const TVector3 &theVertex, TVector2 &theUV)=0
virtual boolean MCCOMAPI CastsShadow ()=0
virtual boolean MCCOMAPI ReceivesShadow ()=0
virtual MCCOMErr MCCOMAPI GetReflectionFeature (I3DExReflectionFeature **reflectionFeature)=0
virtual MCCOMErr MCCOMAPI GetRefractionFeature (I3DExRefractionFeature **refractionFeature)=0
virtual MCCOMErr MCCOMAPI SetReflectionFeature (I3DShReflectionFeature *feature, ECloneMode cloneMode)=0
virtual MCCOMErr MCCOMAPI SetReflectionFeatureByID (int32 kindID)=0
virtual MCCOMErr MCCOMAPI GetReflectionFeature (I3DShReflectionFeature **reflectionFeature)=0
virtual MCCOMErr MCCOMAPI SetRefractionFeature (I3DShRefractionFeature *feature, ECloneMode cloneMode)=0
virtual MCCOMErr MCCOMAPI SetRefractionFeatureByID (int32 kindID)=0
virtual MCCOMErr MCCOMAPI GetRefractionFeature (I3DShRefractionFeature **refractionFeature)=0
virtual MCCOMErr MCCOMAPI SetBackfaceMode (EBackfaceMode BackfaceMode)=0
virtual EBackfaceMode MCCOMAPI GetBackfaceMode ()=0
virtual I3DShTreeElement
*MCCOMAPI 
GetTreeElement ()=0
virtual void MCCOMAPI SetTemporaryCache (IMCUnknown *cache)=0
virtual const IMCUnknown
*MCCOMAPI 
GetTemporaryCache ()=0

Detailed Description

I3DShInstance represents a copy of a primitive located at a certain position in space, with a certain orientation and scaling and a given shader.

Instances always support the following interfaces : I3DShTreeElement, I3DShShadableTree, ISelectableObject


Member Enumeration Documentation

enum I3DShInstance::EInstanceKind
 

These are the constants returned from GetInstanceKind().

Enumeration values:
kPrimitiveInstance 
kSceneInstance 
kCameraInstance 
kLightInstance 
kInstanceKind_Max 


Member Function Documentation

virtual boolean MCCOMAPI I3DShInstance::CastsShadow (   )  [pure virtual]
 

Returns true if the instance is casting shadows on other objects.

virtual MCCOMErr MCCOMAPI I3DShInstance::Dehydrate (  int16  level  )  [pure virtual]
 

Deprecated:
Do not use !

virtual MCCOMErr MCCOMAPI I3DShInstance::DoShade (  ShadingOut &  shadingOut,
ShadingIn &  shadingIn
)  [pure virtual]
 

Returns the shading of a point located on this instance.

Parameters:
shadingOut The returned shading information.
shadingIn The information about the point.

virtual MCCOMErr MCCOMAPI I3DShInstance::FlushFlatennedTextureCaches (   )  [pure virtual]
 

Delete the caches of the flattened textures.

virtual MCCOMErr MCCOMAPI I3DShInstance::Get3DObject (  I3DShObject **  object  )  [pure virtual]
 

Returns a pointer to the Master Object that stores the geometry associated with this instance.

Note that you should call GetDeformed3DObject() if you want to have the geometry of the instance once the deformers have been applied.

Parameters:
object A pointer to the master object.

virtual EBackfaceMode MCCOMAPI I3DShInstance::GetBackfaceMode (   )  [pure virtual]
 

Returns the backface culling mode (see EBackfaceMode).

virtual void MCCOMAPI I3DShInstance::GetBoundingBox (  TBBox3D &  bbox,
ETreeDeformBBoxModes  deformMode
)  [pure virtual]
 

Returns the bounding box of the instance in local coordinates.

Parameters:
bbox The bounding box that is returned.
deformMode The way the deformers are applied for this calculation (see ETreeDeformBBoxModes)

virtual MCCOMErr MCCOMAPI I3DShInstance::GetBump (  TVector3 &  result,
ShadingIn &  shadingIn
)  [pure virtual]
 

Not implemented.

virtual int32 MCCOMAPI I3DShInstance::GetClassSignature (   )  [pure virtual]
 

Returns the Class ID of the external object that is associated with the instance. For a primitive it is the class ID of the external primitive, for a light it is the class ID of the light source, for a camera it is the class ID of the camera.

virtual MCCOMErr MCCOMAPI I3DShInstance::GetDeformed3DObject (  I3DShObject **  object  )  [pure virtual]
 

Returns a master object that stores the geometry of the instance once the deformer have been applied.

Parameters:
object The deformed object.

virtual void MCCOMAPI I3DShInstance::GetFacetBoundingBox (  TBBox3D &  bbox,
ETreeDeformBBoxModes  deformMode,
TMatrix33 &  mappingTransform,
void *  listener,
uint32  matrixChangedPhase
)  [pure virtual]
 

The bounding box calculated here fit exactly the facets of the object in a given direction. The FacetBounding boxes are cached inside the Object because it can take a long time to calculate. We added a listener here to accelerate the Get. So we don't have to compare mappingTransform (TMatrix33) in the look-up table. A last hit is provide inside the GetFacetBoundingBox method to make the Get on same listener very fast. Each time the BoudingBox of the object changed , the list is flushed. Each time you ask with a new mappingTransform, increment the matrixChangedPhase

Parameters:
bbox The bouding box that is calculated
deformMode The way the deformers are applied for this calculation (see ETreeDeformBBoxModes)

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

Same as GetFlatennedTexturesSync() but the calculation is done in a thread and the maps are only returned once they have been calculated.

virtual MCCOMErr MCCOMAPI I3DShInstance::GetFlatennedTexturesSync (  uint32  uvSpaceID,
UVMaps &  maps,
boolean  wantsProgress,
TMCRealRect *  range = nil
)  const [pure 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.
wantsProgress True if a progress bar should be displayed during the calculation.

virtual MCCOMErr MCCOMAPI I3DShInstance::GetFMesh (  real  lod,
FacetMesh **  mesh
)  [pure virtual]
 

Returns the facet mesh of the instance for a given level of details.

Parameters:
lod The level of details requested.
mesh The facetmesh that is returned

virtual MCCOMErr MCCOMAPI I3DShInstance::GetIndex (  int32 &  index  )  [pure virtual]
 

Returns the index of the instance in the master group that contains it. This is the index that is stored in the instance index GBuffer.

Parameters:
index The index of the instance.

virtual int32 MCCOMAPI I3DShInstance::GetInstanceKind (   )  [pure virtual]
 

Returns the instance Kind (see EInstanceKind).

virtual MCCOMErr MCCOMAPI I3DShInstance::GetMainColors (  TMCColorRGBA &  color1,
TMCColorRGBA &  color2
)  [pure virtual]
 

Return an approximation of the shading.

virtual MCCOMErr MCCOMAPI I3DShInstance::GetReflectionFeature (  I3DShReflectionFeature **  reflectionFeature  )  [pure virtual]
 

Returns a pointer to the reflection feature of this instance.

Parameters:
reflectionFeature The reflection feature.

virtual MCCOMErr MCCOMAPI I3DShInstance::GetReflectionFeature (  I3DExReflectionFeature **  reflectionFeature  )  [pure virtual]
 

Returns a pointer to the reflection feature of this instance.

Parameters:
reflectionFeature The reflection feature.

virtual MCCOMErr MCCOMAPI I3DShInstance::GetRefractionFeature (  I3DShRefractionFeature **  refractionFeature  )  [pure virtual]
 

Returns a pointer to the refraction feature of this instance.

Parameters:
reflectionFeature The refraction feature.

virtual MCCOMErr MCCOMAPI I3DShInstance::GetRefractionFeature (  I3DExRefractionFeature **  refractionFeature  )  [pure virtual]
 

Returns a pointer to the refraction feature of this instance.

Parameters:
reflectionFeature The refraction feature.

virtual MCCOMErr MCCOMAPI I3DShInstance::GetShader (  I3DShMasterShader **  masterShader  )  [pure virtual]
 

Returns the master shader.

Parameters:
masterShader The master shader

virtual MCCOMErr MCCOMAPI I3DShInstance::GetShadingFlags (  ShadingFlags &  theFlags  )  [pure virtual]
 

Returns the flags of the master shader.

Parameters:
theFlags The flags of the shader.

virtual const IMCUnknown* MCCOMAPI I3DShInstance::GetTemporaryCache (   )  [pure virtual]
 

Returns a pointer to the temporary cache store with SetTemporaryCache

virtual I3DShTreeElement* MCCOMAPI I3DShInstance::GetTreeElement (   )  [pure virtual]
 

Returns a pointer to the I3DShTreeElement interface.

virtual MCCOMErr MCCOMAPI I3DShInstance::GetURL (  TMCString &  name,
int16 &  kind
)  [pure virtual]
 

Returns the URL associated with the instance.

virtual MCCOMErr MCCOMAPI I3DShInstance::GetUVSpace (  uint32  uvSpaceID,
UVSpaceInfo *  uvSpaceInfo
)  [pure virtual]
 

Return the description of a given shading domaine.

Parameters:
uvSpaceID The index of the shading domaine.
uvSpaceInfo The information that is returned.

virtual uint32 MCCOMAPI I3DShInstance::GetUVSpaceCount (   )  [pure virtual]
 

Returns the number of shading domaine on the instance.

virtual MCCOMErr MCCOMAPI I3DShInstance::GetVertexUV (  boolean &  res,
const TVector3 &  theVertex,
TVector2 &  theUV
)  [pure virtual]
 

Returns the texture coordinates of a 3D point on the surface of the instance.

Parameters:
res True if the points is on the instance
theVertex The position of the point in 3D.
theUV The texture coordinates.

virtual boolean MCCOMAPI I3DShInstance::IsVolumeInstance (   )  [pure virtual]
 

Returns true if the instance is a volume primitive.

virtual boolean MCCOMAPI I3DShInstance::RayHit (  RayHitParameters &  param  )  [pure virtual]
 

Calculates the intersection of a Ray and the instance. (The ray should be in local coordinates of the instance.

Parameters:
param The parameters of the raytracing.

virtual boolean MCCOMAPI I3DShInstance::RayHitFacet (  RayHitParameters &  params,
uint32  facetIndex,
real  lod
)  [pure virtual]
 

calculates the intersection between a ray and a triangle of a primitive. Note that if the primitive is self-Raytracable, the facetIndex is ignored and the intersection is calculated with the whole primitive.

Parameters:
params the raytracing parameters (ray, hit...)
facetIndex the index of the facet to intersect
lod the lod of the primitive from which the facet is coming from

virtual boolean MCCOMAPI I3DShInstance::ReceivesShadow (   )  [pure virtual]
 

Returns true if other objects can cast shadows on this object.

virtual MCCOMErr MCCOMAPI I3DShInstance::Set3DObject (  I3DShObject *  object  )  [pure virtual]
 

Sets the Master Object that stores the geometry associated with this instance.

Parameters:
object A pointer to the master object.

virtual MCCOMErr MCCOMAPI I3DShInstance::SetBackfaceMode (  EBackfaceMode  BackfaceMode  )  [pure virtual]
 

Sets the backface culling mode (see EBackfaceMode).

Parameters:
BackfaceMode The backface culling mode (see EBackfaceMode).

virtual MCCOMErr MCCOMAPI I3DShInstance::SetReflectionFeature (  I3DShReflectionFeature *  feature,
ECloneMode  cloneMode
)  [pure virtual]
 

Sets reflection feature of this instance.

Parameters:
feature The reflection feature.
cloneMode The clone mode (see ECloneMode).

virtual MCCOMErr MCCOMAPI I3DShInstance::SetReflectionFeatureByID (  int32  kindID  )  [pure virtual]
 

Sets type of reflection feature of this instance.

Parameters:
kindID The class ID of the reflection feature.

virtual MCCOMErr MCCOMAPI I3DShInstance::SetRefractionFeature (  I3DShRefractionFeature *  feature,
ECloneMode  cloneMode
)  [pure virtual]
 

Sets refraction feature of this instance.

Parameters:
feature The refraction feature.
cloneMode The clone mode (see ECloneMode).

virtual MCCOMErr MCCOMAPI I3DShInstance::SetRefractionFeatureByID (  int32  kindID  )  [pure virtual]
 

Sets type of refraction feature of this instance.

Parameters:
kindID The class ID of the refraction feature.

virtual MCCOMErr MCCOMAPI I3DShInstance::SetShader (  I3DShMasterShader *  masterShader  )  [pure virtual]
 

Sets the master shader that is applied to the instance.

Parameters:
masterShader The master shader

virtual MCCOMErr MCCOMAPI I3DShInstance::SetShadingFromMaps (  uint32  uvSpaceID,
UVMaps &  maps,
MapParams *  mapParams,
TMCRealRect *  range = nil
)  [pure virtual]
 

Undocumented.

virtual void MCCOMAPI I3DShInstance::SetTemporaryCache (  IMCUnknown *  cache  )  [pure virtual]
 

Sets a temporary cache on the instance (example when calculating a postrenderer per instance such as Aura3D)

Parameters:
cache A pointer to a cache. Null if you want to delete the cache

virtual MCCOMErr MCCOMAPI I3DShInstance::SetURL (  const TMCString &  name,
int16  kind
)  [pure virtual]
 

Sets the URL associated with the instance.

virtual void MCCOMAPI I3DShInstance::ShadeAndLight (  LightingDetail &  result,
const LightingContext &  lightingContext
)  [pure virtual]
 

Calculate the lighting and shading of a point located on this instance.

Parameters:
result The resulting color and lighting info
lightingContext All the info about the point to light and the lighting of the scene

virtual MCCOMErr MCCOMAPI I3DShInstance::ShaderModified (   )  [pure virtual]
 

Notify the instance that its shader has been modified.

virtual boolean MCCOMAPI I3DShInstance::UsesDefaultShader (   )  [pure virtual]
 

Returns true if the instance has the default shader applied to it.


The documentation for this struct was generated from the following file:
Generated on Mon Mar 14 12:29:02 2005 for Carrara SDK Doc by  doxygen 1.3.9.1