DWFToolkit::DWFIncludeSegment Class Reference
[3D Publisher API]

#include "dwf/publisher/model/IncludeSegment.h"

List of all members.


Detailed Description

A segment class for defining visual elements that can be referenced throughout the scene.

Since:
7.0.1
An include segment is simply a "regular" segment that is defined in the include library rather than the scene graph. These segments are exactly like the scene segments except that they are not part of the scene directly. Rather they must be referenced, or included, in the scene via the DWFSegment::include() methods.

This class, as part of the 3D Publisher API also may contribute to the metadata of the DWF. Currently all include segments must be named; and this name is not arbitrary. The include segment name may be used as the object node in the DWF object structure. When a segment is included in another segment that is named (that is, a segment that itself is an object node), the included segment contributes its graphics to the scene but only the properties of the included object are applied to the referencing node. When a segment is included in another segment that is unnamed, the included segment creates a node in the object hierarchy.

Examples:

3DPublish/3DPublish_UTF8.cpp.

Definition at line 58 of file IncludeSegment.h.

Public Member Functions

_DWFTK_API DWFIncludeSegment (DWFSegmentHandlerBuilder &rSegmentBuilder, DWFGeometryHandlerBuilder &rGeometryBuilder, DWFFeatureHandlerBuilder &rFeatureBuilder, DWFAttributeHandlerBuilder &rAttributeBuilder, DWFPublishedObject::Factory &rObjectFactory, bool bUseOldObjectModel=false) throw ()
_DWFTK_API DWFIncludeSegment (const DWFIncludeSegment &rSegment) throw ()
_DWFTK_API DWFIncludeSegmentoperator= (const DWFIncludeSegment &rSegment) throw ()
virtual _DWFTK_API ~DWFIncludeSegment () throw ()
_DWFTK_API void open (const DWFString *zName) throw ( DWFException )
_DWFTK_API void open (const DWFString &zName) throw ( DWFException )
virtual _DWFTK_API void setContentEntity (DWFEntity *pEntity) throw ( DWFException )
virtual _DWFTK_API void setContentObject (DWFObject *) throw ( DWFException )

Static Public Attributes

static const char *const kz_Include_Library
 The local include library for the scene graph.


Constructor & Destructor Documentation

_DWFTK_API DWFToolkit::DWFIncludeSegment::DWFIncludeSegment DWFSegmentHandlerBuilder rSegmentBuilder,
DWFGeometryHandlerBuilder rGeometryBuilder,
DWFFeatureHandlerBuilder rFeatureBuilder,
DWFAttributeHandlerBuilder rAttributeBuilder,
DWFPublishedObject::Factory &  rObjectFactory,
bool  bUseOldObjectModel = false
throw ()
 

Constructor

Parameters:
rSegmentBuilder An interface for acquiring the segment-specific op-code handlers.
rGeometryBuilder An interface for acquiring the geometry-specific op-code handlers.
rFeatureBuilder An interface for acquiring the feature-specific op-code handlers.
rAttributeBuilder An interface for acquiring the attribute-specific op-code handlers.
rObjectFactory An interface for building published objects.
bUseOldObjectModel Use old object model, true or false.
Exceptions:
None 

_DWFTK_API DWFToolkit::DWFIncludeSegment::DWFIncludeSegment const DWFIncludeSegment rSegment  )  throw ()
 

Copy Constructor

Parameters:
rSegment The segment to clone.
Exceptions:
DWFException 

virtual _DWFTK_API DWFToolkit::DWFIncludeSegment::~DWFIncludeSegment  )  throw () [virtual]
 

Destructor

Exceptions:
None 


Member Function Documentation

_DWFTK_API void DWFToolkit::DWFIncludeSegment::open const DWFString zName  )  throw ( DWFException )
 

Opens the segment for use.

The usage model for segments is:

  1. Create or obtain a segment object.
  2. Open the segment.
  3. Add geometry, attributes, sub-segments, etc.
  4. Close the segment.
  5. Repeat. (The same segment object can be reused.)

Parameters:
zName An optional name for the segment. If a segment is named it will be marked as a node and captured in the package metadata as a defined object and/or instance.
Exceptions:
DWFException 

_DWFTK_API void DWFToolkit::DWFIncludeSegment::open const DWFString zName  )  throw ( DWFException )
 

Opens the segment for use.

The usage model for segments is:

  1. Create or obtain a segment object.
  2. Open the segment.
  3. Add geometry, attributes, sub-segments, etc.
  4. Close the segment.
  5. Repeat. (The same segment object can be reused.)

Parameters:
zName An optional name for the segment. If a segment is named it will be marked as a node and captured in the package metadata as a defined object and/or instance.
Exceptions:
DWFException 
Examples:
3DPublish/3DPublish_UTF8.cpp.

_DWFTK_API DWFIncludeSegment& DWFToolkit::DWFIncludeSegment::operator= const DWFIncludeSegment rSegment  )  throw ()
 

Assignment Operator

Parameters:
rSegment The segment to clone.
Exceptions:
DWFException 

virtual _DWFTK_API void DWFToolkit::DWFIncludeSegment::setContentEntity DWFEntity pEntity  )  throw ( DWFException ) [virtual]
 

Instead of generating an entity for the include segment, use the provided one. This call is useful if you directly create an entity directly in the content, or if you want to assign an entity generated in an earlier model, to the current segment.

Note: Any of the following scenarios will throw an exception. 1) This is called after include has be called on this segment. 2) This is called after setEntity has already been called on this segment. 3) include is called after calling this ( the exception is thrown by include ).

Parameters:
pEntity The DWFEntity which will be associated with this segment.
Exceptions:
DWFException 

virtual _DWFTK_API void DWFToolkit::DWFIncludeSegment::setContentObject DWFObject  )  throw ( DWFException ) [virtual]
 

Content objects cannot be set on an include segment, since include segments are only associated with content entities. This is provided to prevent users from calling the base class setContentObject, by throwing an exception.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:40:45 2009 for Autodesk DWF Toolkit by  doxygen 1.4.5