All Frameworks Class Hierarchy This Framework Next Indexes
SPAha_bridge Class IEntityConverter
SPAbase.ACIS_OBJECT
|
+---IEntityConverter
Usage: you can derive this class.
public class IEntityConverter
Interface to be implemented by custom ENTITY conversion classes.
Role: An implementation of this class should convert ACIS
ENTITYs into shaded representations based on polygon meshes.
It should also output the correct material types to the display
objects so that the user's color and texture settings are handled
correctly.
Constructor and Destructor Index
- o
~IEntityConverter()
- Default destructor.
Method Index
- o
ConvertEntity(ENTITY*,ha_rendering_options&,HA_Map*,char*)
- Convert the given ACIS entity to HOOPS display-object data.
- o
ConvertEntityAsm(ENTITY*,ha_rendering_options&,ha_rendering_context&)
- Convert the given ACIS entity to HOOPS display-object data.
- o
ConvertModelComponents(component_handle*,ha_rendering_options&,ha_rendering_context&)
- Convert a component of an assembly model to HOOPS display-object data.
- o
ConvertModelGeometry(asm_model*,ha_rendering_options&,ha_rendering_context&)
- Convert the geometry of the given assembly model to HOOPS display-object data.
Constructor and Destructor
o ~IEntityConverter
public virtual ~IEntityConverter( | ) |
-
Default destructor.
Methods
o ConvertEntity
-
Convert the given ACIS entity to HOOPS display-object data.
Role: Converts the geometric primitives associated with
the given ACIS ENTITY to HOOPS display-object data and updates
the mapping between the ACIS ENTITY pointers and the HOOPS keys.
This is the method that should be called to initially create the
data for an entity; it should not attempt a limited rebuild
of the object. However, it should at least look to see if there
are existing data created by this converter and remove them from the
display object before creating the new data.
If the entity to be converted may be an ASM_ASSEMBLY, or belong to an
assembly model, the ConvertEntityAsm method should be
implemented and used instead. (That method uses additional segment patterns
and maps associated with assembly objects.) The default implementation of
this method issues a system error when called on an ASM_ASSEMBLY.
- Parameters:
-
- entity
- Entity to be converted. This will most likely be a top-level ENTITY such
as BODY, but could conceivably be a lower topological type as well.
However, it should preferably be the topmost ENTITY pointer available.
- ro
- Set of ha_rendering_options to be used for the ENTITY conversion.
- map
- Pointer to the HA_Map containing the mapping between ACIS ENTITY pointers and
HOOPS segment keys. This mapping should be updated by custom converter
classes during conversion.
- pattern
- Segment pattern string (see HA_Build_Segment_String).
- Returns:
- HOOPS segment key for the specified ENTITY.
o ConvertEntityAsm
-
Convert the given ACIS entity to HOOPS display-object data.
Role: Converts the geometric primitives associated with
the given ACIS ENTITY to HOOPS display-object data and updates
the mapping between the ACIS ENTITY pointers and the HOOPS keys.
This is the method that should be called to initially create the
data for an entity; it should not attempt a limited rebuild
of the object. However, it should at least look to see if there
are existing data created by this converter and remove them from the
display object before creating the new data.
This is the method, rather than ConvertEntity, that must be implemented
when the entity to be rendered may be an ASM_ASSEMBLY or belong to an
assembly model. To signal this, its default behavior is to issue
a system error when the given entity is an ASM_ASSEMBLY;
when it is not, the method merely calls ConvertEntity
with the appropriate parameter values.
- Parameters:
-
- entity
- Entity to be converted. This will most likely be a top-level ENTITY such
as BODY, but could conceivably be a lower topological type as well.
However, it should preferably be the topmost ENTITY pointer available.
- ro
- Set of ha_rendering_options to be used for the ENTITY conversion.
- rc
- The rendering context, including all segment pattern strings and HOOPS/ACIS
mappings.
- Returns:
- HOOPS segment key for the specified ENTITY.
o ConvertModelComponents
-
Convert a component of an assembly model to HOOPS display-object data.
Role: The purpose of this method is, first, to create the HOOPS segments
corresponding to the specified model component. In addition, it should locate
the segments corresponding to the model geometry, if any, and connect them (via the HOOPS
Include mechanism) to the associated components. (If it fails to locate the geometry,
is should call ConvertModelGeometry in order to create it, then connect
the results to the component.) The default implementation does nothing.
- Parameters:
-
- comp
- Component to be converted.
- ro
- Set of ha_rendering_options to be used for the conversion.
- rc
- The rendering context, including all segment pattern strings and HOOPS/ACIS
mappings.
- Returns:
- HOOPS segment key for the specified component_handle.
o ConvertModelGeometry
-
Convert the geometry of the given assembly model to HOOPS display-object data.
Role: Within an assembly, the geometry associated with a particular model
may be used multiple times. The purpose of this method is to create HOOPS
segments for such a model so that the geometry is available for inclusion by
the model components that require it. The default implementation calls
ConvertEntityAsm on all top-level entities associated with the model.
- Parameters:
-
- model
- Model whose geometry is to be converted.
- ro
- Set of ha_rendering_options to be used for the conversion.
- rc
- The rendering context, including all segment pattern strings and HOOPS/ACIS
mappings.
- Returns:
- HOOPS segment key for the specified asm_model.
This object is included in the file: ientityconverter.h