A Point is a generic concept used to describe a Geometry's Vertex or ControlPoint.
Having a generic term for this concept allows the user to write code to traverse an objects geometry in a generic fashion without resorting to special case handling based on a specific geometry type.
using namespace XSI; using namespace MATH; Application app; Model root = app.GetActiveSceneRoot(); X3DObject myGrid; root.AddGeometry( L"Grid", L"MeshSurface", L"", myGrid ); Geometry geom = myGrid.GetActivePrimitive().GetGeometry(0); Point point(geom.GetPoints().GetItem(0) ); CVector3 pos( point.GetPosition() ); app.LogMessage( CValue(pos.GetX()).GetAsText() + L"," + CValue(pos.GetY()).GetAsText() + L"," + CValue(pos.GetZ()).GetAsText() );
#include <xsi_point.h>
Public Member Functions | |
Point () | |
~Point () | |
Point (const CRef &in_ref) | |
Point (const Point &in_obj) | |
bool | IsA (siClassID in_ClassID) const |
siClassID | GetClassID () const |
Point & | operator= (const Point &in_obj) |
Point & | operator= (const CRef &in_ref) |
MATH::CVector3 | GetPosition () const |
CStatus | PutPosition (const MATH::CVector3 &in_vect) |
MATH::CVector3 | GetNormal (bool &io_bValid) const |
LONG | GetIndex () const |
CSampleRefArray | GetSamples () const |
SubComponent | GetSubComponent () const |
Point | Navigate (siNavigateComponentType in_siNavigate) const |
Point | ( | ) |
Default constructor.
~Point | ( | ) |
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 SIObject.
Reimplemented in ControlPoint, and Vertex.
siClassID GetClassID | ( | ) | const [virtual] |
Returns the type of the API class.
Reimplemented from SIObject.
Reimplemented in ControlPoint, and Vertex.
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. |
Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.
in_ref | constant class object. |
Reimplemented from SIObject.
Reimplemented in ControlPoint, and Vertex.
MATH::CVector3 GetPosition | ( | ) | const |
CStatus PutPosition | ( | const MATH::CVector3 & | in_vect | ) |
Sets the position of this Point object.
in_vect | CVector3 object. |
MATH::CVector3 GetNormal | ( | bool & | io_bValid | ) | const |
Returns the normal of this Point object.
io_bValid | Returns true if the normal is valid. |
LONG GetIndex | ( | ) | const |
CSampleRefArray GetSamples | ( | ) | const |
SubComponent GetSubComponent | ( | ) | const |
Creates a SubComponent object from this Point object.
Point Navigate | ( | siNavigateComponentType | in_siNavigate | ) | const |
Navigates the Point 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 vis versa.
in_siNavigate | Type of direction for navigating the Facet objects. |