Public Member Functions
TriangleVertex Class Reference

## Detailed Description

A TriangleVertex represents a Point of a Triangle object.

See also:
  Triangle, CTriangleRefArray, CTriangleVertexRefArray, Geometry

Example:

            using namespace XSI;
            using namespace MATH;

            Application app;
            Model root = app.GetActiveSceneRoot();

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

            Triangle triangle(
                myCube.GetActivePrimitive().GetGeometry().GetTriangles().GetItem(0));
            TriangleVertex vertex0(triangle.GetPoints().GetItem(0));

            CVector3 pos(vertex0.GetPosition());

            app.LogMessage( L"Vertex 0: " +
                CValue(pos.GetX()).GetAsText() + L"," +
                CValue(pos.GetY()).GetAsText() + L"," +
                CValue(pos.GetZ()).GetAsText() );

`#include <xsi_trianglevertex.h>`

Inheritance diagram for TriangleVertex:
[legend]

List of all members.

## Public Member Functions
| TriangleVertex ()
| ~TriangleVertex ()
| TriangleVertex (const CRef &in_ref)
| TriangleVertex (const TriangleVertex &in_obj)
bool | IsA (siClassID in_ClassID) const
siClassID | GetClassID () const
TriangleVertex & | operator= (const TriangleVertex &in_obj)
TriangleVertex & | operator= (const CRef &in_ref)
MATH::CVector3 | GetPosition () const
MATH::CVector3 | GetNormal () const
CVertexColor | GetColor () const
CUV | GetUV () const
LONG | GetIndex () const

## Constructor & Destructor Documentation

TriangleVertex | ( |  | ) |

Default constructor.

~TriangleVertex | ( |  | ) |

Default destructor.

TriangleVertex | ( | const CRef & | in_ref | ) |

Constructor.

Parameters:

  in_ref | constant reference object.

TriangleVertex | ( | const TriangleVertex & | 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.

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

Returns the type of the API class.

Returns:
  The class type.

Reimplemented from SIObject.

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

TriangleVertex& 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 TriangleVertex object.

Reimplemented from SIObject.

MATH::CVector3 GetPosition | ( |  | ) | const

Returns the position of this TriangleVertex object.

Returns:
  The TriangleVertex position.

MATH::CVector3 GetNormal | ( |  | ) | const

Returns the normal of this TriangleVertex object. Triangles that belong to the same polygon have the same normal values.

Returns:
  The TriangleVertex normal.

CVertexColor GetColor | ( |  | ) | const

Returns the vertex color of this TriangleVertex object.

Returns:
  The TriangleVertex color.

CUV GetUV | ( |  | ) | const

Returns the UV coordinates this TriangleVertex object.

Returns:
  The TriangleVertex UV coordinates.

LONG GetIndex | ( |  | ) | const

Returns the index of this TriangleVertex object in the geometry.

Returns:
  The TriangleVertex index.

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

- xsi_trianglevertex.h