VisualizationFoundation CATRep

Usage: you must use this class as is. You should never derive it.


public class CATRep

Class to create a representation of an application object.
Role: This class is the base class for all representation classes, necessary to visualize application objects. Representations are organized into representation trees, possess graphic attributes, and can be manipulated. This class defines these three basic behaviors.
Predefined representations (for two dimensions and three dimensions spaces) are available and should satisfy most of your needs.


Constructor and Destructor Index


o CATRep()
Constructs a representation.
o ~CATRep()

Method Index


o AddChild(CATRep&)
Adds a child graphic representation.
o AddChildren(CATRep&)
Adds a child graphic representation but does not compute the new bounding element.
o AddParent(CATRep&)
Adds a specific representation to the list of parents.
o BuildHightlightLook(CATPathElement&,CATRepPath&)
Sets the representation path for highlighted state (calls BuildRepPath by default).
o ComputeBoundingElement(int)
Computes the bounding element of the representation.
o CreateRep()
Constructs a representation.
o Destroy()
Deletes the representation.
o GetChildren()
Returns the list of children representations, if it exists.
o GetGraphicAttributeSet()
Returns the associated set of graphic attributes.
o GetGraphicAttributeSet(CATGraphicAttributeSet&)
Retrieves the associated set of graphic attributes.
o GetInheritanceMode()
Returns the inheritance mode of the representation.
o GetIsValidTC()
Return the validity of texture coordinates.
o GetManipulator()
Returns the manipulator of the representation.
o GetMaterialInheritance()
Returns the inheritance mode for the material of the rep.
o GetNbParents()
Returns the number of parent representations.
o GetParentListCopy()
Returns a list of parent representations.
o GetRepParents(int)
Iteration method to retreive the parent representations.
o IsHidden()
Indicates that the representation is hidden.
o IsOkToDraw(CATRender&,int)
Tests whether the representation will draw its graphic primitives.
o RemoveChild(CATRep&)
Removes a child representation.
o RemoveChildren(CATRep&)
Removes a child representation but does not compute the new bounding element.
o RemoveParent(CATRep&)
Removes a specific representation from the list of parents.
o SetColor(unsigned int)
Sets the color of the representation.
o SetColorRGBA(unsigned int,unsigned int,unsigned int,unsigned int)
Sets the color of the representation, in RGBA notation.
o SetFixedThickness(unsigned int)
Sets the thickness used for drawing lines of the representation.
o SetGraphicAttributeSet(CATGraphicAttributeSet&)
Sets the associated set of graphic attributes.
o SetHighlightMode(int,int)
Sets the highlight mode of the representation.
o SetInheritanceMode(unsigned int)
Sets the inheritance mode of the representation.
o SetIsValidTC(int)
Sets the validity of texture coordinates.
o SetLineType(unsigned int)
Sets the line type used for drawing lines of the representation.
o SetLowlightMode(unsigned int)
Sets the lowlight mode of the representation.
o SetManipulator(CATManipulator*)
Attach a manipulator to the representation.
o SetMaterialInheritance(int)
Sets the heritance mode for material.
o SetPickMode(unsigned int)
Sets the pick mode of the representation.
o SetShowFreeMode(unsigned int)
Sets the show free mode of the representation.
o SetShowMode(int,int)
Sets the show mode of the representation.
o SetThickness(unsigned int)
Sets the thickness used for drawing lines of the representation.
o SetTransparentMode(unsigned int)
Sets the transparency mode graphic attribute.

Constructor and Destructor


o CATRep
public CATRep()
Constructs a representation.
o ~CATRep
public virtual ~CATRep()

Methods


o AddChild
public virtual AddChild( iRep)
Adds a child graphic representation.
Role: This method is not implemented on the current class.
Parameters:
iRep
Child representation to be added.
o AddChildren
public virtual AddChildren( iRep)
Adds a child graphic representation but does not compute the new bounding element.
Role: This method is not implemented on the current class.
Parameters:
iRep
Child representation to be added.
o AddParent
public virtual AddParent( iParentRep)
Adds a specific representation to the list of parents.
Parameters:
iParentRep
The parent rep to be added.
o BuildHightlightLook
public virtual BuildHightlightLook( const iPathElement,
oRepPath)
Sets the representation path for highlighted state (calls BuildRepPath by default).
Parameters:
iPathElement
oRepPath
o ComputeBoundingElement
public virtual ComputeBoundingElement( iShowSpace= 1)
Computes the bounding element of the representation. The bounding element should be the smallest possible sphere containing the representation.
Parameters:
iShowSpace

Legal Values:
  1. 0 :
  2. 1 :
o CreateRep
public static CreateRep()
Constructs a representation.
o Destroy
public virtual Destroy()
Deletes the representation. Do not use the delete operator for this purpose.
o GetChildren
public virtual GetChildren()
Returns the list of children representations, if it exists. The class remains owner of the list. Do not delete the list.
o GetGraphicAttributeSet
public GetGraphicAttributeSet()
Returns the associated set of graphic attributes.
Deprecated:
R216 use void GetGraphicAttributeSet(CATGraphicAttributeSet& oAttributeSet) method instead to get the attribut or void SetGraphicAttributeSet(const CATGraphicAttributeSet& iGraphicAttributeSet) to set it.
o GetGraphicAttributeSet
public GetGraphicAttributeSet( oAttributeSet)
Retrieves the associated set of graphic attributes.
o GetInheritanceMode
public GetInheritanceMode()
Returns the inheritance mode of the representation.
o GetIsValidTC
public virtual GetIsValidTC()
Return the validity of texture coordinates.
o GetManipulator
public GetManipulator()
Returns the manipulator of the representation.
o GetMaterialInheritance
public virtual GetMaterialInheritance()
Returns the inheritance mode for the material of the rep.
o GetNbParents
public virtual GetNbParents()
Returns the number of parent representations.
o GetParentListCopy
public virtual GetParentListCopy()
Returns a list of parent representations. The class is not owner of the returned list. It is your responsability to delete the list.
o GetRepParents
public virtual GetRepParents( index)
Iteration method to retreive the parent representations.
Parameters:
index
the index of the parent representation you want to retrieve from the list of parents.
Returns:
NULL if index is negative or equal or superior to the number of parents The returned CATRep remains owned by this object . Do not delete it.
o IsHidden
public virtual IsHidden()
Indicates that the representation is hidden.
o IsOkToDraw
public virtual IsOkToDraw( ioRender,
ioInside)
Tests whether the representation will draw its graphic primitives.
Returns:
  1. 0 : the representation must not be drawn
  2. 1 : the representation must be drawn
Parameters:
ioRender
The render used to draw the representation.
ioInside
This parameter indicates whether the representation is fully in the view frustrum. Legal values
  1. 0 : the representation is fully or partially out of the view frustrum. Not all graphic primitives will be drawn.
  2. 1 : the representation is fully in the view frustrum. All graphic primitives will be drawn.
o RemoveChild
public virtual RemoveChild( iRep)
Removes a child representation.
Role: This method is not implemented on the current class.
Parameters:
iRep
Child representation to be removed.
o RemoveChildren
public virtual RemoveChildren( iRep)
Removes a child representation but does not compute the new bounding element. Role: This method is not implemented on the current class.
Parameters:
iRep
Child representation to be removed.
o RemoveParent
public virtual RemoveParent( iParentRep)
Removes a specific representation from the list of parents.
Parameters:
iParentRep
The parent rep to be removed.
o SetColor
public virtual SetColor( iColor)
Sets the color of the representation.
Parameters:
iColor
The index of the color. You can use predefined color see
o SetColorRGBA
public virtual SetColorRGBA( iRed,
iGreen,
iBlue,
iAlpha= 255)
Sets the color of the representation, in RGBA notation.
Parameters:
iRed
The red component of the color must be in the range [0,255].
iGreen
The green component of the color must be in the range [0,255].
iBlue
The blue component of the color must be in the range [0,255].
iAlpha
The opacity component of the color must be in the range [0,255].
o SetFixedThickness
public virtual SetFixedThickness( iThickness)
Sets the thickness used for drawing lines of the representation.
Parameters:
iThickness
Indicates the width of the line in pixels in the range [1,8].
o SetGraphicAttributeSet
public SetGraphicAttributeSet( const iGraphicAttributeSet)
Sets the associated set of graphic attributes.
Parameters:
iGraphicAttributeSet
The set of graphic attributes for the representation.
o SetHighlightMode
public virtual SetHighlightMode( iHighlightMode,
iPropagationMode= 0)
Sets the highlight mode of the representation.
Parameters:
iHighlightMode

Legal Values:
  1. 0 :
  2. 1 :
iPropagationMode

Legal Values:
  1. 0 :
  2. 1 :
o SetInheritanceMode
public SetInheritanceMode( iInheritance)
Sets the inheritance mode of the representation.
Parameters:
iInheritance
iInheritance is a Bitwise OR of masks that indicates the children reps will automatically have this rep's color or/and line width or/and line type attributes as specified by
method. Legal values are :
  1. RESET_INHERITANCE : Stop all inheritance
  2. COLOR_INHERITANCE : Activate color inheritance
  3. LINEWIDTH_INHERITANCE : Activate line width inheritance
  4. LINETYPE_INHERITANCE : Activate line type inheritance
RESET_INHERITANCE is used to stop the inheritance.
o SetIsValidTC
public virtual SetIsValidTC( iState)
Sets the validity of texture coordinates.
Parameters:
iState
  1. 0 : TC invalid, they will be computed at next Draw
  2. 1 : TC valid
o SetLineType
public virtual SetLineType( iLineType)
Sets the line type used for drawing lines of the representation.
Parameters:
iLineType
Legal values are :
  1. 1 : solid
  2. 2 : dotted
  3. 3 : dashed
  4. 4 : dot-dashed
  5. 5 : phantom
o SetLowlightMode
public virtual SetLowlightMode( iLowlightMode)
Sets the lowlight mode of the representation.
Parameters:
iLowlightMode
  1. 0 : representation is drawn normally
  2. 1 : representation is drawn in lowlight
o SetManipulator
public SetManipulator( iManipulator)
Attach a manipulator to the representation.
Parameters:
iManipulator
Manipulator of the representation.
o SetMaterialInheritance
public virtual SetMaterialInheritance( iInheritance)
Sets the heritance mode for material.
Parameters:
iInheritance
  1. MATERIAL_NOT_INHERIT : children reps will not have this rep's material
  2. MATERIAL_INHERIT : children reps will have automaticly this rep's material
  3. MATERIAL_FORCE_INHERIT : same as INHERIT, but even when a father has the INHERIT flag
o SetPickMode
public virtual SetPickMode( iPickMode)
Sets the pick mode of the representation.
Parameters:
iPickMode
  1. 0 : representation is pickable
  2. 1 : representation is not pickable
o SetShowFreeMode
public virtual SetShowFreeMode( iShowFreeMode)
Sets the show free mode of the representation.
Parameters:
iShowFreeMode
  1. 0 : the show/noshow parameter of the representation is taken into account
  2. 1 : the show/noshow parameter of the representation is not taken into account
o SetShowMode
public virtual SetShowMode( iShowMode,
iPropagationMode= 0)
Sets the show mode of the representation.
Parameters:
iShowMode

Legal Values:
  1. 0 :
  2. 1 :
iPropagationMode

Legal Values:
  1. 0 :
  2. 1 :
o SetThickness
public virtual SetThickness( iThickness)
Sets the thickness used for drawing lines of the representation.
Parameters:
iThickness
Indicates the index width of the line in the range [1,55]. This index is pointing on the true width in pixel, recorded in the standard (if there is one in the document) or in the setting.
o SetTransparentMode
public virtual SetTransparentMode( iTransparentMode)
Sets the transparency mode graphic attribute.
Parameters:
iTransparentMode

Legal Values:
  1. 0 : transparency is disabled
  2. 1 : transparency is eneabled
.

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

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