Public Member Functions
Annotation Class Reference

Detailed Description

The Annotation class is a specialized X3DObject used for inserting text annotation in a scene.

Since:
10.5 (2012)
Example:
How to add a simple text annotation to a model object.
    XSI::Model mymodel = Application().GetActiveSceneRoot().AddModel("MyModel");
    Annotation annotation = mymodel.AddAnnotation("This model is annotated");
    Application().LogMessage( mymodel.GetName() + " is annotated with " + annotation.GetName() + ": " + CString(annotation.GetParameterValue( "Message" )), siComment );
See also:
X3DObject::AddAnnotation

#include <xsi_annotation.h>

Inheritance diagram for Annotation:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Annotation ()
 ~Annotation ()
 Annotation (const CRef &in_ref)
 Annotation (const Annotation &in_obj)
bool IsA (siClassID in_ClassID) const
siClassID GetClassID () const
Annotationoperator= (const Annotation &in_obj)
Annotationoperator= (const CRef &in_ref)
CString GetURLAt (LONG in_viewid, LONG in_xcoord, LONG in_ycoord) const

Constructor & Destructor Documentation

Default constructor.

~Annotation ( )

Default destructor.

Annotation ( const CRef in_ref)

Constructor.

Parameters:
in_refconstant reference object.
Annotation ( const Annotation in_obj)

Copy constructor.

Parameters:
in_objconstant 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_ClassIDclass type.
Returns:
true if the class is compatible, false otherwise.

Reimplemented from X3DObject.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from X3DObject.

Annotation& operator= ( const Annotation 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_objconstant class object.
Returns:
The new Annotation object.
Annotation& 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_refconstant class object.
Returns:
The new Annotation object.

Reimplemented from X3DObject.

CString GetURLAt ( LONG  in_viewid,
LONG  in_xcoord,
LONG  in_ycoord 
) const

Returns the URL string from an annotation at a given view position. Returns an empty string if there is no URL found. This is typically used from a custom tool for invoking a URL embedded in an annotation.

Parameters:
in_viewidThe view ID to query. This is typically available from ToolContext::GetViewIndex.
in_xcoordThe view X coordinate for the query.
in_ycoordThe view Y coordinate for the query.
Returns:
The URL string.

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