SDK question 2005-02-03 - By mark wilson
Back Yeah I know that. What I was actually angling for is the local transform matrix of the vertex. When you select a vertex, XSI has a local coord space for it, just wondering if I could get hold of that. I should have been more clear in my question. To be honest it doesn't really matter now as I have worked round it, but if anyone knows...
Mark
-- --Original Message-- -- From: owner-xsi@(protected) [mailto:owner-xsi@(protected)] On Behalf Of Aloys Baillet Sent: 03 February 2005 14:21 To: XSI@(protected) Subject: Re: SDK question
You can retrieve the Geometry object and ask for its vertices: Geometry can be a NurbCurveList, NurbSurfaceMesh or a PolygonMesh.
>From the CPointRefArray of the SDK doc:
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);
CPointRefArray points( geom.GetPoints() );
CValue val(points.GetCount()); app.LogMessage( CString(L"Number of points: ") + val.GetAsText() );
for(long i = 0; i < points.GetCount(); ++i) { Point pt(points[i]); CVector3 pos( pt.GetPosition() );
app.LogMessage( CValue(pos.GetX()).GetAsText() + L"," + CValue(pos.GetY()).GetAsText() + L"," + CValue(pos.GetZ()).GetAsText() ); }
On Thu, 3 Feb 2005 13:49:06 -0000, mark wilson <mark@(protected)> wrote: > Anyone know how to get the local space transform of a vertex using the > C++ API? > > Mark > > --- > Unsubscribe? Mail Majordomo@(protected) with the following text in body: > unsubscribe xsi >
-- Aloys Baillet - TD / R&D @ La Maison - www.alamaison.fr --- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|