VisualizationController CATExtIVisu

Usage: you can derive this class.


public class CATExtIVisu

Adapter for specialized CATIVisu interface .
Role: This class provides a default implementation for any extension of interface deriving from , which is the super-class of any Visualization interface. That means one should derive from this class to implement an extension of a Visualization interface.


Constructor and Destructor Index


o CATExtIVisu(void)
Constructs the class.
o ~CATExtIVisu(void)

Method Index


o BuildHighlightLook(CATPathElement&,CATRepPath&)
Builds step by step a path of graphical representations from a path of objects for (pre)highlight purposes.
o BuildRep()
Builds the graphical representation of the object.
o BuildRepPath(CATPathElement&,CATRepPath&)
Builds step by step a path of graphical representations from a path of objects.
o DecodeGraphic(CATPickPath&,CATPathElement&)
Builds step by step a path of objects from a path of graphical representations.
o GetChildrenList()
Returns a pointer to the list of children of the current object.
o GiveRep()
Returns the graphical representation of the object.
o IsHighlightValid(CATPathElement&)
Method used to test if the elements of a CATPathElement are valid for highlight.
o IsRepUpToDate()
Tests whether or not the graphical representation of the current component is uptodate.
o ModifyRep(CATNotification&)
Modifies the geometry or the graphical attributes of the object.
o SetAsmGraphicAttribute(CATRep*,CATVisPropertyType,CATVisPropertiesValues&)
Sets asm graphic attributes on the rep.
o SetEdgeGraphicAttribute(CATRep*,CATVisPropertyType,CATVisPropertiesValues&)
Sets edge graphic attributes on the rep.
o SetGraphicAttribut()
Sets the main graphic attributes onto the graphical representation.
o SetGraphicAttributeSet(CATGraphicAttributeSet*,CATVisPropertyType,CATVisPropertiesValues&)
Transfer some data from a CATVisPropertiesValues in a CATGraphicAttributeSet.
o SetGraphicMaterial()
Sets the material attribute onto the graphical representation.
o SetLineGraphicAttribute(CATRep*,CATVisPropertyType,CATVisPropertiesValues&)
Sets line graphic attributes on the rep.
o SetMeshGraphicAttribute(CATRep*,CATVisPropertyType,CATVisPropertiesValues&)
Sets mesh graphic attributes on the rep.
o SetOtherGeomTypeGraphicAttribute(CATRep*,CATVisGeomType,CATVisPropertyType,CATVisPropertiesValues&)
Sets other graphic attributes (different from point, edge, line, mesh and asm) on the rep.
o SetPointGraphicAttribute(CATRep*,CATVisPropertyType,CATVisPropertiesValues&)
Sets point graphic attributes on the rep.
o SetRepNotUpToDate()
Sets the graphical representation of this object to an not uptodate state.
o UnreferenceRep()
Sets the reference to the graphical representation to null.

Data Member Index


o _iid
IID of the interface that object implements by deriving CATExtIVisu.
o _rep
A pointer to the geometry associated to the current model.

Constructor and Destructor


o CATExtIVisu
public CATExtIVisu( )
Constructs the class.
o ~CATExtIVisu
public virtual ~CATExtIVisu( )

Methods


o BuildHighlightLook
public virtual BuildHighlightLook( const iPathElt,
ioPathRep)
Builds step by step a path of graphical representations from a path of objects for (pre)highlight purposes.
Role: The same as but it is for (pre)highlight purposes only.
Parameters:
iPathElt
input path of objects enclosing the current object.
ioPathRep
output path of graphical representations to fill in.
Returns:
an HRESULT value.
Legal values:
  1. S_OK if the operation succeeds
  2. E_FAIL otherwise
o BuildRep
public virtual BuildRep()
Builds the graphical representation of the object.
Role : It is the general method that applications have to implement to built their geometry from modeling information. The data member must be valuated.
o BuildRepPath
public virtual BuildRepPath( const iPathElt,
ioPathRep)
Builds step by step a path of graphical representations from a path of objects.
Role: Adds the current graphical representation into the output path of graphical representations ioPathRep. The default behavior is to add in turn the graphical representations to the output by going through the input iPathElt from top to leaf. One extension can take hand and change the default behavior and manipulate the input to get further information (eg what is under the current object of the input ?). It's up to the implementation to decide what are the graphical representations associated to the sub-elements enclosed inside the input path iPathElt.
Parameters:
iPathElt
input path of objects enclosing the current object.
ioPathRep
output path of graphical representations to fill in.
Returns:
an HRESULT value.
Legal values:
  1. S_OK if the operation succeeds
  2. E_FAIL otherwise
o DecodeGraphic
public virtual DecodeGraphic( const iPickPath,
ioPathElt)
Builds step by step a path of objects from a path of graphical representations.
Role: Add the current object to ioPathElt. The default behavior is to add in turn objects to the output by going through the input path of graphical representations from top to leaf. One extension can take hand and change the default behavior and manipulate the input to get further information (eg what is under the current graphical representation of the input ?). This method should be implemented to decode another object than itself ; for instance if one object wants to decode sub-elements of itself through its own access services.
Parameters:
iPickPath
input path of graphical representations.
ioPathElt
output path of model to fill in.
Returns:
an HRESULT value.
Legal values:
  1. S_OK if the operation succeeds
  2. E_FAIL otherwise
o GetChildrenList
public virtual GetChildrenList()
Returns a pointer to the list of children of the current object.
Role: The default implementation is based on graphical representations. That means the returned list is based on the graphical children'list of the current graphical representation. Then we get back the model from the graphical representations through their model identifier. Nevertheless this implementation is often the wrong way to get back the children'list (because it is not pertinent) and one had better call a service provided by the CATIAV5 model design. In that case one has to overrride this method.
o GiveRep
public virtual GiveRep()
Returns the graphical representation of the object.
o IsHighlightValid
public virtual IsHighlightValid( iPathElt)
Method used to test if the elements of a CATPathElement are valid for highlight.
Role: in the default implementation, finds the first element that implements . It then calls recursively method IsHighlightValid until one of the element has redefined this method or until the grahical representation is NULL.
Parameters:
iPathElt
input path of components of which we want to determine if they are highlightable..
Returns:
an HRESULT value.
Legal values:
  • S_OK if none of the graphical representation data member of the elements of iPathElt is NULL
  • E_FAIL if a graphical representation data member of one of the elements of iPathElt is NULL
  • .
o IsRepUpToDate
public virtual IsRepUpToDate()
Tests whether or not the graphical representation of the current component is uptodate.
Returns:
  1. 1 if the graphical representation data member of the component is uptodate
  2. 0 if the graphical representation data member of the component is not uptodate
o ModifyRep
public virtual ModifyRep( const iNotif)
Modifies the geometry or the graphical attributes of the object.
Role: It is the general method called by the Visu Manager ( ) for processing all the notifications concerning visual changes for one object (eg geometrical change, color/show/pick attribute change, ...). Generic notifications treated by this default implementation are of type .
If a specific model supports other specific notifications, which are related to any model modification, it may also define specific processing for those specialized event. To achieve this goal, one has to override the ModifyRep method and do some job only for those specific notifications. But caution, if you overwrite this method, at the end of it, the default method should be called so as to profit by generic processing.
Returns:
the status of the notification's processing.
Legal values: the status is either
  1. 0 when the input notification has not been processed. Then the Visu Manager takes hand and the default processing is applied
  2. 1 when the input notification has been processed.
Parameters:
iNotif
the input notification holding all the information we need in order to process it.
o SetAsmGraphicAttribute
protected virtual SetAsmGraphicAttribute( iRep,
iPropertyType,
iPropertyValue)
Sets asm graphic attributes on the rep.
Parameters:
iRep
rep on which asm graphic attributes are set.
iPropertyType
type of property to put on the rep.
Legal values:
  1. CATVPColor : color of the asm object
  2. CATVPOpacity : opacity of the asm object
  3. CATTVPSymbol : symbol of the asm object
  4. CATTVPLineType : LineType of the asm object
  5. CATVPWidth : width of the asm object
  6. CATVPInheritance : inheritance of the asm object
  7. CATVPAllPropertyType : all types are put on the asm object
iPropertyValue
Token which contains asm graphic attributes to put on the rep.
o SetEdgeGraphicAttribute
protected virtual SetEdgeGraphicAttribute( iRep,
iPropertyType,
iPropertyValue)
Sets edge graphic attributes on the rep.
Parameters:
iRep
rep on which edge graphic attributes are set.
iPropertyType
type of property to put on the rep.
Legal values:
  1. CATVPColor : color of the edge
  2. CATTVPLineType : type of the edge
  3. CATVPWidth : width of the edge
  4. CATVPAllPropertyType : all types are put on the edge
iPropertyValue
Token which contains point graphic attributes to put on the rep.
o SetGraphicAttribut
public virtual SetGraphicAttribut()
Sets the main graphic attributes onto the graphical representation.
They are read from the model through the interface managing graphical properties.
o SetGraphicAttributeSet
protected SetGraphicAttributeSet( oAtt,
iPropertyType,
iPropertyValue)
Transfer some data from a CATVisPropertiesValues in a CATGraphicAttributeSet.
Parameters:
oAtt
CATGraphicAttributeSet which is set.
iPropertyType
type of property to transfer from iPropertyValue on oAtt.
Legal values:
  1. CATVPColor : color
  2. CATVPOpacity : opacity
  3. CATTVPLineType : LineType
  4. CATVPWidth : width
iPropertyValue
Token which contains graphic attributes to put on oAtt.
o SetGraphicMaterial
public virtual SetGraphicMaterial()
Sets the material attribute onto the graphical representation.
Role: It is read from the model through the interface managing material.
o SetLineGraphicAttribute
protected virtual SetLineGraphicAttribute( iRep,
iPropertyType,
iPropertyValue)
Sets line graphic attributes on the rep.
Parameters:
iRep
rep on which line graphic attributes are set.
iPropertyType
type of property to put on the rep.
Legal values:
  1. CATVPColor : color of the line
  2. CATTVPLineType : type of the line
  3. CATVPWidth : width of the line
  4. CATVPAllPropertyType : all types are put on the line
iPropertyValue
Token which contains point graphic attributes to put on the rep.
o SetMeshGraphicAttribute
protected virtual SetMeshGraphicAttribute( iRep,
iPropertyType,
iPropertyValue)
Sets mesh graphic attributes on the rep.
Parameters:
iRep
rep on which mesh graphic attributes are set.
iPropertyType
type of property to put on the rep.
Legal values:
  1. CATVPColor : color of the mesh
  2. CATVPOpacity : opacity of the mesh
  3. CATVPAllPropertyType : all types are put on the mesh
iPropertyValue
Token which contains mesh graphic attributes to put on the rep.
o SetOtherGeomTypeGraphicAttribute
protected virtual SetOtherGeomTypeGraphicAttribute( iRep,
iGeomType,
iPropertyType,
iPropertyValue)
Sets other graphic attributes (different from point, edge, line, mesh and asm) on the rep.
role: If new graphic attributes (different from mesh, point, edge, line, asm) have been created, this function must be overhide to set on a rep these new graphic attributes.
Parameters:
iRep
rep on which iGeomType graphic attributes are set.
iGeomType
Type of graphic attributes to put on the rep.
iPropertyType
type of property to put on the rep.
Legal values:
  1. CATVPColor : color of the iGeomType
  2. CATVPOpacity : opacity of the iGeomType
  3. CATTVPSymbol : symbol of the iGeomType
  4. CATTVPLineType : LineType of the iGeomType
  5. CATVPWidth : width of the iGeomType
  6. CATVPInheritance : inheritance of the iGeomType
  7. CATVPAllPropertyType : all types are put on the asm iGeomType
iPropertyValue
Token which contains graphic attributes to put on the rep.
o SetPointGraphicAttribute
protected virtual SetPointGraphicAttribute( iRep,
iPropertyType,
iPropertyValue)
Sets point graphic attributes on the rep.
Parameters:
iRep
rep on which point graphic attributes are set.
iPropertyType
type of property to put on the rep.
Legal values:
  1. CATVPColor : color of the point
  2. CATTVPSymbol : symbol of the point
  3. CATVPAllPropertyType : all types are put on the point
iPropertyValue
Token which contains point graphic attributes to put on the rep.
o SetRepNotUpToDate
public virtual SetRepNotUpToDate()
Sets the graphical representation of this object to an not uptodate state.
Role: Sets the the graphical representation data member to an invalid state. The return to a valid state can only be reached when the representation is built again. Method GiveRep will return NULL if the data member is invalid.
o UnreferenceRep
public virtual UnreferenceRep()
Sets the reference to the graphical representation to null.
Role: It is automatically called within the deletion mechanism of a graphical representation thanks to its model identifier. Remind that the deletion mechanism of a graphical representation has to be performed by the Visu Manager : either one sends a event or one destroys a whole tree of graphical representations by the invocation of the method. Do not delete a graphical representation outside the scope of the the Visu Manager.
If you overwrite this method, at this end of it, the default method should be called .

Data Members


o _iid
  protected const IID & _iid
IID of the interface that object implements by deriving CATExtIVisu.
o _rep
  protected CATRep *_rep
A pointer to the geometry associated to the current model. This pointer is set by the GetRep() method and it is unreferenced through either the dedicated UnreferenceRep() method or the destructor.

This object is included in the file: CATExtIVisu.h
If needed, your Imakefile.mk should include the module: CATVisController

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.