Interface ICamApiMeshBuilder
Builds a triangle mesh on the caller side, then hands the whole result to
a visual object in a single AddMesh call. Vertices are added once and
referenced by index from triangles. By default the mesh holds geometry
only and the color is taken from the visual object at the moment the mesh
is added; the AddVertexColored / AddVerticesColored variants attach a
per-vertex color ($AARRGGBB), which the renderer interpolates across each
triangle. Per-vertex colors are all-or-nothing for one builder: once any
colored vertex is added, vertices added without a color default to white.
The AddVertexUV / AddVerticesUV variants attach per-vertex texture
coordinates, used when the visual object carries a texture
(ICamApiTexturedVO); they follow the same all-or-nothing rule.
Assembly: CAMAPI.ViewPort.dll
Syntax
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("078E118C-F9EC-44CD-BA06-DC6205AFBF14")]
public interface ICamApiMeshBuilder
Properties
TriangleCount
Number of triangles added so far.
Declaration
int TriangleCount { get; }
Property Value
VertexCount
Number of vertices added so far.
Declaration
Property Value
Methods
AddFaceLoop(IntPtr, int)
Declaration
void AddFaceLoop(IntPtr Coords, int CoordCount)
Parameters
| Type |
Name |
Description |
| IntPtr |
Coords |
|
| int |
CoordCount |
|
AddLoopPoint(TST3DPoint)
Declaration
void AddLoopPoint(TST3DPoint P)
Parameters
AddTriangle(int, int, int)
Declaration
void AddTriangle(int I1, int I2, int I3)
Parameters
AddTriangles(IntPtr, int)
Declaration
void AddTriangles(IntPtr Indices, int IndexCount)
Parameters
| Type |
Name |
Description |
| IntPtr |
Indices |
|
| int |
IndexCount |
|
AddVertex(TST3DPoint, TST3DPoint)
Declaration
int AddVertex(TST3DPoint P, TST3DPoint Normal)
Parameters
Returns
AddVertexColored(TST3DPoint, TST3DPoint, int)
Declaration
int AddVertexColored(TST3DPoint P, TST3DPoint Normal, int Color)
Parameters
Returns
AddVertexUV(TST3DPoint, TST3DPoint, double, double)
Declaration
int AddVertexUV(TST3DPoint P, TST3DPoint Normal, double U, double V)
Parameters
Returns
AddVertices(IntPtr, int, IntPtr, int)
Declaration
void AddVertices(IntPtr Coords, int CoordCount, IntPtr Normals, int NormalCount)
Parameters
AddVerticesColored(IntPtr, int, IntPtr, int, IntPtr, int)
Declaration
void AddVerticesColored(IntPtr Coords, int CoordCount, IntPtr Normals, int NormalCount, IntPtr Colors, int ColorCount)
Parameters
AddVerticesUV(IntPtr, int, IntPtr, int, IntPtr, int)
Declaration
void AddVerticesUV(IntPtr Coords, int CoordCount, IntPtr Normals, int NormalCount, IntPtr UVs, int UVCount)
Parameters
BeginFace()
Begin a planar face defined by loops. The kernel triangulates it
(outer loop + holes, even-odd rule) and appends the resulting
triangles. Add the outer loop first, then any holes, each wrapped
in BeginFaceLoop/EndFaceLoop; finish with EndFace. Non-planar surfaces
must be supplied directly as triangles via AddVertex/AddTriangle.
Declaration
BeginFaceLoop()
Begin a loop of the current face (the first is the outer boundary,
subsequent ones are holes).
Declaration
Clear()
Drop all accumulated geometry so the builder can be reused.
Declaration
EndFace()
Triangulate the accumulated face (outer + holes) and append it.
Declaration
EndFaceLoop()
Finish the current face loop.
Declaration