Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

exotkAIS_DisplayManager Class Reference

Wrapper class on AIS_DisplayManager,V3d_Viewer, to manage the displayed objects. More...

#include <exotkAIS_DisplayManager.hxx>

Collaboration diagram for exotkAIS_DisplayManager:

Collaboration graph
[legend]
List of all members.

Public Methods

void * operator new (size_t, void *anAddress)
 OCC new. More...

void * operator new (size_t size)
 OCC new. More...

void operator delete (void *anAddress)
 OCC delete. More...

Standard_EXPORT exotkAIS_DisplayManager ()
 Constructor. More...

Standard_EXPORT exotkAIS_DisplayManager (const Handle_V3d_Viewer &aViewer)
 Constructor with an existing viewer. More...

Standard_EXPORT exotkAIS_DisplayManager (const Handle_AIS_InteractiveContext &anAISContext)
 Constructor with an existing InteractiveContext. More...

virtual Standard_EXPORT ~exotkAIS_DisplayManager ()
 Destructor. More...

virtual Standard_EXPORT TCollection_AsciiString SetNameSeed (const TCollection_AsciiString &aNewSeed)
 Set the name seed for the object names ( if you give "Object" as seed, the names are "Object_1" ). More...

virtual Standard_EXPORT TCollection_AsciiString NameSeed ()
 Return the name seed. More...

virtual Standard_EXPORT Handle_AIS_InteractiveContext & InteractiveContext ()
 Return the interactive context. More...

virtual Standard_EXPORT TCollection_AsciiString Add (const Handle_AIS_InteractiveObject &anObjectToAdd, const TCollection_AsciiString &aProposedName=TCollection_AsciiString(), const Standard_Integer aDisplayMode=0, const Standard_Boolean UpdateViewer=Standard_True)
 Add anObjectToAdd to the Display Manager. More...

virtual Standard_EXPORT TCollection_AsciiString Remove (const Handle_AIS_InteractiveObject &anObjectToRemove, const Standard_Boolean UpdateViewer=Standard_True)
 Remove anObjectToRemove from the Display Manager. More...

virtual Standard_EXPORT TCollection_AsciiString Remove (const TCollection_AsciiString &anObjectNameToRemove, const Standard_Boolean UpdateViewer=Standard_True)
 Remove an Handle_AIS_InteractiveObject from the Display Manager from its name. More...

virtual Standard_EXPORT void SetDisplayMode (const Handle_AIS_InteractiveObject &anObject, const enum exotkAIS_DisplayMode aMode)
 Set aMode as display mode for anObject. More...

virtual Standard_EXPORT Standard_Boolean NameExists (const TCollection_AsciiString &aNameToTest)
 Return true if aNameToTest exists in the display manager. More...

virtual Standard_EXPORT Standard_Boolean ObjectExists (const Handle_AIS_InteractiveObject &anObjectToTest)
 Return true if anObjectToTest exists in the display manager. More...

virtual Standard_EXPORT TCollection_AsciiString Name (const Handle_AIS_InteractiveObject &anObjectToFind)
 Return the name of anObjectToFind. More...

virtual Standard_EXPORT Standard_Boolean CurrentObjects (AIS_SequenceOfInteractive &aSequence)
 return a sequence with the current objects. More...

virtual Standard_EXPORT Handle_AIS_InteractiveObject InteractiveObject (const TCollection_AsciiString &aNameToFind)
 Return the InteractiveObject associated with aNameToFind. More...

virtual Standard_EXPORT void SetMaterial (const Handle_AIS_InteractiveObject &anObject, const Graphic3d_MaterialAspect &aMaterial)
 Set aMaterial for anObject. More...

virtual Standard_EXPORT void SetTransparency (const Handle_AIS_InteractiveObject &anObject, const Standard_Real aTransparency)
 Set aTransparency for anObject. More...

Standard_EXPORT const Handle_Standard_Type & DynamicType () const
 Type management. More...

Standard_EXPORT Standard_Boolean IsKind (const Handle_Standard_Type &) const
 Type management. More...


Private Attributes

Handle_AIS_InteractiveContext myAISContext
exotkAIS_DoubleMapAsciiStringAISInteractiveObject myMap
TCollection_AsciiString myNameSeed
Standard_Integer myNameIndex

Friends

Standard_EXPORT friend Handle_Standard_Type & exotkAIS_DisplayManager_Type_ ()
 Type management. More...


Detailed Description

Wrapper class on AIS_DisplayManager,V3d_Viewer, to manage the displayed objects.

Author:
Stephane Routelous

Definition at line 63 of file exotkAIS_DisplayManager.hxx.


Constructor & Destructor Documentation

exotkAIS_DisplayManager::exotkAIS_DisplayManager  
 

Constructor.

Definition at line 90 of file exotkAIS_DisplayManager.cxx.

References exotkAIS_GraphicDevice::GetGraphicDevice(), exotkAIS_GraphicDevice::Instance(), myAISContext, myNameIndex, and myNameSeed.

exotkAIS_DisplayManager::exotkAIS_DisplayManager const Handle_V3d_Viewer &    aViewer
 

Constructor with an existing viewer.

Parameters:
aViewer  const Handle_V3d_Viewer&

Definition at line 124 of file exotkAIS_DisplayManager.cxx.

References myAISContext, myNameIndex, and myNameSeed.

exotkAIS_DisplayManager::exotkAIS_DisplayManager const Handle_AIS_InteractiveContext &    anAISContext
 

Constructor with an existing InteractiveContext.

Parameters:
anAISContext  const Handle_AIS_InteractiveContext&

Definition at line 142 of file exotkAIS_DisplayManager.cxx.

References myAISContext, myNameIndex, and myNameSeed.

exotkAIS_DisplayManager::~exotkAIS_DisplayManager   [virtual]
 

Destructor.

Definition at line 159 of file exotkAIS_DisplayManager.cxx.


Member Function Documentation

exotkAIS_DisplayManager::Add const Handle_AIS_InteractiveObject &    anObjectToAdd,
const TCollection_AsciiString &    aProposedName = TCollection_AsciiString(),
const Standard_Integer    aDisplayMode = 0,
const Standard_Boolean    UpdateViewer = Standard_True
[virtual]
 

Add anObjectToAdd to the Display Manager.

Returns:
TCollection_AsciiString : the name of the object
Parameters:
anObjectToAdd  const Handle_AIS_InteractiveObject&
aProposedName  const TCollection_AsciiString& = TCollection_AsciiString()
aDisplayMode  const Standard_Integer = 0
UpdateViewer  const Standard_Boolean = Standard_True

Definition at line 255 of file exotkAIS_DisplayManager.cxx.

References exotkAIS_DoubleMapAsciiStringAISInteractiveObject::Bind(), exotkAIS_DoubleMapAsciiStringAISInteractiveObject::Find2(), exotkAIS_DoubleMapAsciiStringAISInteractiveObject::IsBound2(), myAISContext, myMap, myNameIndex, myNameSeed, and NameExists().

exotkAIS_DisplayManager::CurrentObjects AIS_SequenceOfInteractive &    aSequence [virtual]
 

return a sequence with the current objects.

Returns:
Standard_Boolean : true if some objects are currents
Return values:
aSequence  AIS_SequenceOfInteractive&

Definition at line 396 of file exotkAIS_DisplayManager.cxx.

References myAISContext.

Handle_Standard_Type & exotkAIS_DisplayManager::DynamicType   const
 

Type management.

Returns:
const Handle_Standard_Type&

exotkAIS_DisplayManager::InteractiveContext   [virtual]
 

Return the interactive context.

Returns:
Handle_AIS_InteractiveContext&

Definition at line 208 of file exotkAIS_DisplayManager.cxx.

References myAISContext.

exotkAIS_DisplayManager::InteractiveObject const TCollection_AsciiString &    aNameToFind [virtual]
 

Return the InteractiveObject associated with aNameToFind.

Returns:
Handle_AIS_InteractiveObject : null if aNameToFind is not found
Parameters:
aNameToFind  const TCollection_AsciiString&

Definition at line 357 of file exotkAIS_DisplayManager.cxx.

References exotkAIS_DoubleMapAsciiStringAISInteractiveObject::Find1(), exotkAIS_DoubleMapAsciiStringAISInteractiveObject::IsBound1(), and myMap.

Referenced by Remove().

exotkAIS_DisplayManager::IsKind const Handle_Standard_Type &    const
 

Type management.

Returns:
Standard_Boolean
Parameters:
const  Handle_Standard_Type&

exotkAIS_DisplayManager::Name const Handle_AIS_InteractiveObject &    anObjectToFind [virtual]
 

Return the name of anObjectToFind.

Returns:
TCollection_AsciiString : empty if anObjectToFind is not found
Parameters:
anObjectToFind  const Handle_AIS_InteractiveObject&

Definition at line 377 of file exotkAIS_DisplayManager.cxx.

References exotkAIS_DoubleMapAsciiStringAISInteractiveObject::Find2(), exotkAIS_DoubleMapAsciiStringAISInteractiveObject::IsBound2(), and myMap.

Referenced by Remove().

exotkAIS_DisplayManager::NameExists const TCollection_AsciiString &    aNameToTest [virtual]
 

Return true if aNameToTest exists in the display manager.

Returns:
Standard_Boolean
Parameters:
aNameToTest  const TCollection_AsciiString&

Definition at line 221 of file exotkAIS_DisplayManager.cxx.

References exotkAIS_DoubleMapAsciiStringAISInteractiveObject::IsBound1(), and myMap.

Referenced by Add().

exotkAIS_DisplayManager::NameSeed   [virtual]
 

Return the name seed.

Returns:
TCollection_AsciiString

Definition at line 195 of file exotkAIS_DisplayManager.cxx.

References myNameSeed.

exotkAIS_DisplayManager::ObjectExists const Handle_AIS_InteractiveObject &    anObjectToTest [virtual]
 

Return true if anObjectToTest exists in the display manager.

Returns:
Standard_Boolean
Parameters:
anObjectToTest  const Handle_AIS_IteractiveObject&

Definition at line 237 of file exotkAIS_DisplayManager.cxx.

References exotkAIS_DoubleMapAsciiStringAISInteractiveObject::IsBound2(), and myMap.

Referenced by SetDisplayMode(), SetMaterial(), and SetTransparency().

void exotkAIS_DisplayManager::operator delete void *    anAddress [inline]
 

OCC delete.

Returns:
inline void
Parameters:
void  *anAddress

Definition at line 96 of file exotkAIS_DisplayManager.hxx.

References exotkAIS_DisplayMode.

void * exotkAIS_DisplayManager::operator new size_t    size [inline]
 

OCC new.

Returns:
inline void*
Parameters:
size_t  size

Definition at line 85 of file exotkAIS_DisplayManager.hxx.

void * exotkAIS_DisplayManager::operator new size_t   ,
void *    anAddress
[inline]
 

OCC new.

Returns:
inline void*
Parameters:
size_t 
void  * anAddress

Definition at line 74 of file exotkAIS_DisplayManager.hxx.

exotkAIS_DisplayManager::Remove const TCollection_AsciiString &    anObjectNameToRemove,
const Standard_Boolean    UpdateViewer = Standard_True
[virtual]
 

Remove an Handle_AIS_InteractiveObject from the Display Manager from its name.

Returns:
TCollection_AsciiString : return the name of the removed object. If the name is emoty, the function failed
Parameters:
anObjectNameToRemove  const TCollection_AsciiString&
UpdateViewer  const Standard_Boolean = Standard_True

Definition at line 338 of file exotkAIS_DisplayManager.cxx.

References InteractiveObject(), and Remove().

exotkAIS_DisplayManager::Remove const Handle_AIS_InteractiveObject &    anObjectToRemove,
const Standard_Boolean    UpdateViewer = Standard_True
[virtual]
 

Remove anObjectToRemove from the Display Manager.

Returns:
TCollection_AsciiString : return the name of the removed object. If the name is emoty, the function failed
Parameters:
anObjectToRemove  const Handle_AIS_InteractiveObject&
UpdateViewer  const Standard_Boolean = Standard_True

Definition at line 308 of file exotkAIS_DisplayManager.cxx.

References exotkAIS_DoubleMapAsciiStringAISInteractiveObject::IsBound2(), myAISContext, myMap, Name(), and exotkAIS_DoubleMapAsciiStringAISInteractiveObject::UnBind2().

Referenced by Remove().

exotkAIS_DisplayManager::SetDisplayMode const Handle_AIS_InteractiveObject &    anObject,
const enum exotkAIS_DisplayMode    aMode
[virtual]
 

Set aMode as display mode for anObject.

Parameters:
anObject  const Handle_AIS_InteractiveObject&
aMode  const enum exotkAIS_DisplayMode

Definition at line 417 of file exotkAIS_DisplayManager.cxx.

References myAISContext, and ObjectExists().

exotkAIS_DisplayManager::SetMaterial const Handle_AIS_InteractiveObject &    anObject,
const Graphic3d_MaterialAspect &    aMaterial
[virtual]
 

Set aMaterial for anObject.

Parameters:
anObject  const Handle_AIS_InteractiveObject&
aMaterial  const Graphic3d_MaterialAspect&

Definition at line 435 of file exotkAIS_DisplayManager.cxx.

References myAISContext, and ObjectExists().

exotkAIS_DisplayManager::SetNameSeed const TCollection_AsciiString &    aNewSeed [virtual]
 

Set the name seed for the object names ( if you give "Object" as seed, the names are "Object_1" ).

Returns:
TCollection_AsciiString : the old seed
Parameters:
aNewSeed  const TCollection_AsciiString&

Definition at line 172 of file exotkAIS_DisplayManager.cxx.

References myNameIndex, and myNameSeed.

exotkAIS_DisplayManager::SetTransparency const Handle_AIS_InteractiveObject &    anObject,
const Standard_Real    aTransparency
[virtual]
 

Set aTransparency for anObject.

Parameters:
anObject  const Handle_AIS_InteractiveObject&
aTransparency  const Standard_Real

Definition at line 445 of file exotkAIS_DisplayManager.cxx.

References myAISContext, and ObjectExists().


Friends And Related Function Documentation

Handle_Standard_Type & exotkAIS_DisplayManager::exotkAIS_DisplayManager_Type_   [friend]
 

Type management.

Returns:
friend Handle_Standard_Type&


Member Data Documentation

Handle_AIS_InteractiveContext exotkAIS_DisplayManager::myAISContext [private]
 

the exotkAIS_InteractiveContext

Definition at line 272 of file exotkAIS_DisplayManager.hxx.

Referenced by Add(), CurrentObjects(), exotkAIS_DisplayManager(), InteractiveContext(), Remove(), SetDisplayMode(), SetMaterial(), and SetTransparency().

exotkAIS_DoubleMapAsciiStringAISInteractiveObject exotkAIS_DisplayManager::myMap [private]
 

the map to store the objects and theit names

Definition at line 275 of file exotkAIS_DisplayManager.hxx.

Referenced by Add(), InteractiveObject(), Name(), NameExists(), ObjectExists(), and Remove().

Standard_Integer exotkAIS_DisplayManager::myNameIndex [private]
 

the index for the name

Definition at line 281 of file exotkAIS_DisplayManager.hxx.

Referenced by Add(), exotkAIS_DisplayManager(), and SetNameSeed().

TCollection_AsciiString exotkAIS_DisplayManager::myNameSeed [private]
 

the nname seed for the object names

Definition at line 278 of file exotkAIS_DisplayManager.hxx.

Referenced by Add(), exotkAIS_DisplayManager(), NameSeed(), and SetNameSeed().


The documentation for this class was generated from the following files:
Generated on Wed Jan 23 12:18:30 2002 for exotk by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001