CAM API
  • CAM API
v20.0.1
Search Results for

    Show / Hide Table of Contents

    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.

    Namespace: CAMAPI.ViewPort
    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
    Type Description
    int

    VertexCount

    Number of vertices added so far.

    Declaration
    int VertexCount { get; }
    Property Value
    Type Description
    int

    Methods

    AddFaceLoop(nint, int)

    Declaration
    void AddFaceLoop(nint Coords, int CoordCount)
    Parameters
    Type Name Description
    nint Coords
    int CoordCount

    AddLoopPoint(TST3DPoint)

    Declaration
    void AddLoopPoint(TST3DPoint P)
    Parameters
    Type Name Description
    TST3DPoint P

    AddTriangle(int, int, int)

    Declaration
    void AddTriangle(int I1, int I2, int I3)
    Parameters
    Type Name Description
    int I1
    int I2
    int I3

    AddTriangles(nint, int)

    Declaration
    void AddTriangles(nint Indices, int IndexCount)
    Parameters
    Type Name Description
    nint Indices
    int IndexCount

    AddVertex(TST3DPoint, TST3DPoint)

    Declaration
    int AddVertex(TST3DPoint P, TST3DPoint Normal)
    Parameters
    Type Name Description
    TST3DPoint P
    TST3DPoint Normal
    Returns
    Type Description
    int

    AddVertexColored(TST3DPoint, TST3DPoint, int)

    Declaration
    int AddVertexColored(TST3DPoint P, TST3DPoint Normal, int Color)
    Parameters
    Type Name Description
    TST3DPoint P
    TST3DPoint Normal
    int Color
    Returns
    Type Description
    int

    AddVertexUV(TST3DPoint, TST3DPoint, double, double)

    Declaration
    int AddVertexUV(TST3DPoint P, TST3DPoint Normal, double U, double V)
    Parameters
    Type Name Description
    TST3DPoint P
    TST3DPoint Normal
    double U
    double V
    Returns
    Type Description
    int

    AddVertices(nint, int, nint, int)

    Declaration
    void AddVertices(nint Coords, int CoordCount, nint Normals, int NormalCount)
    Parameters
    Type Name Description
    nint Coords
    int CoordCount
    nint Normals
    int NormalCount

    AddVerticesColored(nint, int, nint, int, nint, int)

    Declaration
    void AddVerticesColored(nint Coords, int CoordCount, nint Normals, int NormalCount, nint Colors, int ColorCount)
    Parameters
    Type Name Description
    nint Coords
    int CoordCount
    nint Normals
    int NormalCount
    nint Colors
    int ColorCount

    AddVerticesUV(nint, int, nint, int, nint, int)

    Declaration
    void AddVerticesUV(nint Coords, int CoordCount, nint Normals, int NormalCount, nint UVs, int UVCount)
    Parameters
    Type Name Description
    nint Coords
    int CoordCount
    nint Normals
    int NormalCount
    nint UVs
    int UVCount

    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
    void BeginFace()

    BeginFaceLoop()

    Begin a loop of the current face (the first is the outer boundary, subsequent ones are holes).

    Declaration
    void BeginFaceLoop()

    Clear()

    Drop all accumulated geometry so the builder can be reused.

    Declaration
    void Clear()

    EndFace()

    Triangulate the accumulated face (outer + holes) and append it.

    Declaration
    void EndFace()

    EndFaceLoop()

    Finish the current face loop.

    Declaration
    void EndFaceLoop()
    In this article