Public Member Functions
Sample Class Reference

Detailed Description

A Sample is a generic concept used to describe a PolygonNode or NurbsSample.

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:
Facet::GetSamples, Segment::GetSamples, Point::GetSamples, Geometry::GetSamples, CSampleRefArray
Example:
        using namespace XSI;
        Application app;
        Model root = app.GetActiveSceneRoot();

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

        CSampleRefArray samples(
            myCube.GetActivePrimitive().GetGeometry().GetSamples() );

        LONG lCount = samples.GetCount();
        for ( LONG i=0; i<lCount; i++ )
        {
            Sample sample(samples[i]);

            app.LogMessage( L"Sample.Index " +
                            CValue(sample.GetIndex()).GetAsText() );
        }

#include <xsi_sample.h>

Inheritance diagram for Sample:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  Sample ()
  ~Sample ()
  Sample (const CRef &in_ref)
  Sample (const Sample &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
Sample operator= (const Sample &in_obj)
Sample operator= (const CRef &in_ref)
LONG  GetIndex () const
SubComponent  GetSubComponent () const
Sample  Navigate (siNavigateComponentType in_siNavigate) const

Constructor & Destructor Documentation

Sample ( )

Default constructor.

~Sample ( )

Default destructor.

Sample ( const CRef in_ref )

Constructor.

Parameters:
in_ref constant reference object.
Sample ( const Sample 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 NurbsSample, and PolygonNode.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from SIObject.

Reimplemented in NurbsSample, and PolygonNode.

Sample& operator= ( const Sample 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 Sample object.
Sample& 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 Sample object.

Reimplemented from SIObject.

Reimplemented in NurbsSample, and PolygonNode.

LONG GetIndex ( ) const

Returns the index of this Sample object relative to its Facet object.

Returns:
The sample's index.

Reimplemented in PolygonNode.

SubComponent GetSubComponent ( ) const

Creates a SubComponent object from this Sample object,

Returns:
A SubComponent object
Sample Navigate ( siNavigateComponentType  in_siNavigate ) const

Navigates the Sample 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 Sample objects.
Returns:
The Sample object being visited.

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