trisurf (lx_trisurf.hpp)

From The Foundry MODO SDK wiki
Jump to: navigation, search
There are security restrictions on this page


Triangle Surfaces

A triangle surface and its related triGroup item type are the most compact way to represent a 3D surface. A group has nearly the same high-level structure as a mesh, with VMAPs and tags, but in a compact, GL-friendly form.

(1) SDK: ILxTriangleSurface interface
         LXxMETHOD(  LxResult,
 SetSize) (
         LXtObjectID              self,
         unsigned                 nvrt,
         unsigned                 ntri);
 
         LXxMETHOD(  LxResult,
 AddVector) (
         LXtObjectID              self,
         LXtID4                   type,
         const char              *name,
         unsigned                *index);
 
         LXxMETHOD(  float *,
 SetVector) (
         LXtObjectID              self,
         unsigned                 index,
         unsigned                 vrt);
 
         LXxMETHOD(  unsigned *,
 SetTriangle) (
         LXtObjectID              self,
         unsigned                 tri);
 
         LXxMETHOD(  unsigned *,
 FixNormals) (
         LXtObjectID              self);
 
         LXxMETHOD(  void,
 GetSize) (
         LXtObjectID              self,
         unsigned                *nvrt,
         unsigned                *ntri);
 
         LXxMETHOD(  unsigned *,
 Triangles) (
         LXtObjectID              self);
 
         LXxMETHOD(  LxResult,
 VectorInfo) (
         LXtObjectID              self,
         unsigned                 index,
         LXtID4                  *type,
         const char             **name,
         unsigned                *dim);
 
         LXxMETHOD(  float *,
 Vector) (
         LXtObjectID              self,
         unsigned                 index);
 
         LXxMETHOD(  LxResult,
 SetEdgeCount) (
         LXtObjectID              self,
         unsigned                 nedge);
 
         LXxMETHOD(  unsigned *,
 SetEdge) (
         LXtObjectID              self,
         unsigned                 edge);

(2) SDK: ILxTriangleGroup interface
         LXxMETHOD(  LxResult,
 AddSurface) (
         LXtObjectID              self,
         void                   **ppvObj);
 
         LXxMETHOD(  LxResult,
 GetSurface) (
         LXtObjectID              self,
         unsigned                 index,
         void                   **ppvObj);

(3) SDK: ILxTriangleGroup interface
         LXxMETHOD(  LxResult,
 Cleanup) (
         LXtObjectID              self);

(4) SDK: Declarations
 #define LXu_TRIANGLESURFACE     "B1D985A7-34D6-4251-94AA-EEFB2C7527F9"
 #define LXu_TRIANGLEGROUP       "3A0597DF-EA75-4272-8831-6B7A2BA5FEE3"

(5) User Class: TriangleSurface method

(6) User Class: TriangleGroup method
         bool
 NewSurf (
         CLxLoc_TriangleSurface  &surf)
 {
         LXtObjectID              obj;
 
         surf.clear ();
         if (LXx_FAIL (AddSurface (&obj)))
                 return false;
 
         return surf.take (obj);
 }
 
         bool
 GetSurf (
         unsigned                 index,
         CLxLoc_TriangleSurface  &surf)
 {
         LXtObjectID              obj;
 
         surf.clear ();
         if (LXx_FAIL (GetSurface (index, &obj)))
                 return false;
 
         return surf.take (obj);
 }

Empty TriangleSurface Python user class.

(7) PY: TriangleSurface method
 pass

Empty TriangleGroup Python user class.

(8) PY: TriangleGroup method
 pass

ILxTriangleGroup1 (Legacy Interface)

This interface was retired in modo 801, and was replaced with an updated one that adds a few more methods.

(9) SDK: Declarations
 #define LXu_TRIANGLEGROUP1      "6975B2A4-69E8-4ED2-9058-9C0948CBB43C"

(10) SDK: ILxTriangleGroup1 interface
         LXxMETHOD(  LxResult,
 AddSurface) (
         LXtObjectID              self,
         void                   **ppvObj);
 
         LXxMETHOD(  LxResult,
 GetSurface) (
         LXtObjectID              self,
         unsigned                 index,
         void                   **ppvObj);