#include <xsi_vertex.h>
The Vertex object gives access to the geometry vertices of an X3DObject's Primitive. A Vertex is the object PolygonMesh specifics of the Point object.
You can access vertices from Edge::GetVertices, PolygonFace::GetVertices and PolygonMesh::GetVertices.
using namespace XSI; using namespace MATH; Application app; Model root = app.GetActiveSceneRoot(); X3DObject myCube; root.AddGeometry( L"Cube", L"MeshSurface", L"", myCube ); PolygonMesh mesh(myCube.GetActivePrimitive().GetGeometry()); Vertex vertex0(mesh.GetVertices().GetItem(0)); app.LogMessage( L"Number of nodes for Vertex 0: " + CValue(vertex0.GetNodes().GetCount()).GetAsText() );
Public Member Functions |
|
Vertex () | |
~Vertex () | |
Vertex (const CRef &in_ref) | |
Vertex (const Vertex &in_obj) | |
bool | IsA (siClassID in_ClassID) const |
siClassID | GetClassID () const |
Vertex & | operator= (const Vertex &in_obj) |
Vertex & | operator= (const CRef &in_ref) |
CPolygonNodeRefArray | GetNodes () const |
CVertexRefArray | GetNeighborVertices (LONG in_lDistance=1) const |
CEdgeRefArray | GetNeighborEdges (LONG in_lDistance=1) const |
CPolygonFaceRefArray | GetNeighborPolygons (LONG in_lDistance=1) const |
CVertexRefArray | GrowNeighborVertices (LONG in_lDistance=1) const |
double | GetCrease () const |
bool | GetIsBoundary () const |
Vertex | ( | ) |
Default constructor.
~Vertex | ( | ) |
Default destructor.
bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
in_ClassID | class type. |
Reimplemented from Point.
siClassID GetClassID | ( | ) | const [virtual] |
Creates an object from another object. The newly created object is set to empty if the input object is not compatible.
in_obj | constant class object. |
CPolygonNodeRefArray GetNodes | ( | ) | const |
Returns the PolygonNode objects adjacent to this Vertex.
CVertexRefArray GetNeighborVertices | ( | LONG | in_lDistance = 1 |
) | const |
CEdgeRefArray GetNeighborEdges | ( | LONG | in_lDistance = 1 |
) | const |
CPolygonFaceRefArray GetNeighborPolygons | ( | LONG | in_lDistance = 1 |
) | const |
Returns an array of PolygonFace neighbors within a given distance.If the distance is 1 all PolygonFace for which one of the Vertex objects is the current Vertex are returned in counter-clockwise order.
in_lDistance | Value representing the degree of neighborhood |
CVertexRefArray GrowNeighborVertices | ( | LONG | in_lDistance = 1 |
) | const |
double GetCrease | ( | ) | const |
Returns the crease value associated with this vertex.
bool GetIsBoundary | ( | ) | const |
Returns whether the control point is a boundary or not.