Public Member Functions
Segment Class Reference

## Detailed Description

A Segment is a generic concept used to describe a PolygonMesh's Edge.

Having a generic term for this concept allows the user to write code to traverse an object's geometry in a generic fashion without resorting to special case handling based on a specific geometry type.

See also:
  CSegmentRefArray, Point, Facet, Geometry

Example:

            using namespace XSI;
            Application app;
            Model root = app.GetActiveSceneRoot();

            X3DObject myCube;
            root.AddGeometry( L"Cube", L"MeshSurface", L"", myCube );

            CSegmentRefArray segments(
                myCube.GetActivePrimitive().GetGeometry().GetSegments() );

            LONG lCount = segments.GetCount();
            for ( LONG i=0; i<lCount; i++ )
            {
                Segment segment(segments[i]);

                app.LogMessage( L"Segment.Index " +
                    CValue(segment.GetIndex()).GetAsText() );
            }

`#include <xsi_segment.h>`

Inheritance diagram for Segment:
[legend]

List of all members.

## Public Member Functions
| Segment ()
| ~Segment ()
| Segment (const CRef &in_ref)
| Segment (const Segment &in_obj)
bool | IsA (siClassID in_ClassID) const
siClassID | GetClassID () const
Segment & | operator= (const Segment &in_obj)
Segment & | operator= (const CRef &in_ref)
CPointRefArray | GetPoints () const
LONG | GetIndex () const
CSampleRefArray | GetSamples () const
SubComponent | GetSubComponent () const
Segment | Navigate (siNavigateComponentType in_siNavigate) const

## Constructor & Destructor Documentation

Segment | ( |  | ) |

Default constructor.

~Segment | ( |  | ) |

Default destructor.

Segment | ( | const CRef & | in_ref | ) |

Constructor.

Parameters:

  in_ref | constant reference object.

Segment | ( | const Segment & | in_obj | ) |

Copy constructor.

Parameters:

  in_obj | constant class object.

## Member Function Documentation

bool IsA | ( | siClassID | in_ClassID | ) | const `[virtual]`

Returns true if a given class type is compatible with this API class.

Parameters:

  in_ClassID | class type.

Returns:
  true if the class is compatible, false otherwise.

Reimplemented from SIObject.

Reimplemented in Edge.

siClassID GetClassID | ( |  | ) | const `[virtual]`

Returns the type of the API class.

Returns:
  The class type.

Reimplemented from SIObject.

Reimplemented in Edge.

Segment& operator= | ( | const Segment & | in_obj | ) |

Creates an object from another object. The newly created object is set to empty if the input object is not compatible.

Parameters:

  in_obj | constant class object.

Returns:
  The new Segment object.

Segment& operator= | ( | const CRef & | in_ref | ) |

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

Parameters:

  in_ref | constant class object.

Returns:
  The new Segment object.

Reimplemented from SIObject.

Reimplemented in Edge.

CPointRefArray GetPoints | ( |  | ) | const

Returns an array of Point objects on this Segment object.

Returns:
  Array of Point objects.

LONG GetIndex | ( |  | ) | const

Returns the index of this Segment object in the geometry's segment array.

Returns:
  The Segment index.

CSampleRefArray GetSamples | ( |  | ) | const

Returns an array of Sample object on this Segment object.

Returns:
  Array of Sample objects.

SubComponent GetSubComponent | ( |  | ) | const

Creates a SubComponent object from this Segment object,

Returns:
  A SubComponent object

Segment Navigate | ( | siNavigateComponentType | in_siNavigate | ) | const

Navigates the Segment objects of the underlying geometry as specifed by the navigation component type. Navigation is circular -- for instance, navigating beyond the last component will return the first and vice versa.

Parameters:

  in_siNavigate | Type of direction for navigating the Segment objects.

Returns:
  The Segment object being visited.

The documentation for this class was generated from the following file:

- xsi_segment.h