3DCoat Core API
The 3DCoat API documentation.
|
The UV API. The mesh is taken from the current room. If paint or UV rooms is active, the mesh is taken from the paint room, otherwise the mesh is taken from the Retopo room. More...
#include <CoreAPI.h>
Static Public Member Functions | |
static int | uvSetsCount () |
get the UV-sets count. | |
static void | setUnwrapIslandsDistance (float distance) |
set the border around the islands when we pack it | |
static float | getUnwrapIslandsDistance () |
get the border around the islands when we pack it | |
static int | currentUvSet () |
get the current uv-set index | |
static int | islandsCount (int uv_set) |
get the islands count over the current uv-set | |
static Mesh | islandToMesh (int uv_set, int island_index) |
get the mesh that contains the island, xy of each point is the UV coordinate. The mesh contains only one island | |
static Mesh | islandToMeshInSpace (int uv_set, int island_index) |
get the mesh that contains the island, each point is the coordinate in space (not the uv coordinate!). The mesh contains only one island. The faces correspond to the faces of the mesh that was got by islandToMesh | |
static std::vector< int > | getIslandVertexMapping (int uv_set, int island_index) |
get the mapping from the vertex index in the mesh that was got by islandToMesh to the vertex index in the original mesh | |
static std::vector< int > | getIslandBorder (int uv_set, int island_index) |
get unsorted list of edges on the border of the island | |
static std::vector< int > | getBorderBetweenIslands (int uv_set1, int island_index1, int uv_set2, int island_index2) |
get the border between two islands | |
static vec2 | getIslandVertexUv (int uv_set, int island_index, int vertex_index) |
get the uv coordinate of the positional vertex in the island | |
static Mesh | flattenSingleIsland (const Mesh &mesh, int method, bool optimize_rotation=true, bool scale_to_geometry=true) |
Flatten the mesh that consists of the single island. | |
static void | meshToIsland (const Mesh &mesh, int uv_set, int island_index) |
use the mesh (that was previously got by islandToMesh) to replace the island in the current uv-set | |
static void | pack (int uv_set, bool rotate, bool shuffle) |
pack the islands in the current uv-set | |
static void | unwrap (int uv_set) |
unwrap the current uv-set | |
static void | toAbf (int uv_set, int island_index) |
unwrap the island using the ABF approach | |
static void | toLscm (int uv_set, int island_index) |
unwrap the island using the LSCM approach | |
static void | toGu (int uv_set, int island_index) |
unwrap the island using the GU (Globally Uniform) approach | |
static void | toPlanar (int uv_set, int island_index) |
unwrap the island using the Planar approach | |
static void | toStripe (int uv_set, int island_index) |
try to uwrap the island as the regular stripe | |
static void | toUvSet (int uv_set, int island_index, int destination_uv_set) |
move the island from one uv-set to another one | |
static Mesh | getWholeMesh () |
get the whole mesh from the paint/UV/Retopo room - in dependence on current room | |
static Mesh | selectedToMesh () |
get the selected faces as the Mesh object | |
static std::vector< int > | getSeams () |
get all seams across the mesh | |
static void | addSeam (DWORDS2 start_vertex_index, int end_vertex_index) |
add the seam to the mesh | |
static void | removeSeam (int start_vertex_index, int end_vertex_index) |
remove the seam from the mesh | |
static std::vector< int > | getSharpEdges () |
get the sharp edges across the mesh | |
static void | addSharpEdge (int start_vertex_index, int end_vertex_index) |
add the sharp edge to the mesh | |
static void | removeSharpEdge (int start_vertex_index, int end_vertex_index) |
remove the sharp edge from the mesh | |
static void | unwrapUnassigned () |
re-wrap/extend islands in correspondence to the changed seams and inserted faces. Pay attention, that it may lead to islands intersection. | |
static void | applyUVSet () |
apply uv changes to the paint room mesh (if we use uv/paint context) | |
The UV API. The mesh is taken from the current room. If paint or UV rooms is active, the mesh is taken from the paint room, otherwise the mesh is taken from the Retopo room.
|
static |
add the seam to the mesh
start_vertex_index | the start positional vertex index |
end_vertex_index | the end positional vertex index |
|
static |
add the sharp edge to the mesh
start_vertex_index | the start positional vertex index |
end_vertex_index | the end positional vertex index |
|
static |
get the current uv-set index
|
static |
Flatten the mesh that consists of the single island.
mesh | the mesh that consists of the single island |
method | the flattening method. 0 - flatten to the plane, 1 - LSCM, 2 - ABF, 3 - GU, 4 - Stripe (if possible) |
optimize_rotation | optimize the rotation of the island, place it approximately horizontally or vertically |
scale_to_geometry | scale the island to keep average edge length equal to the average edge length of the original mesh |
|
static |
get the border between two islands
uv_set1 | the uv set index of the first island |
island_index1 | the island index within the uv set of the first island |
uv_set2 | the uv set index of the second island |
island_index2 | the island index within the uv set of the second island |
|
static |
get unsorted list of edges on the border of the island
uv_set | the uv set index |
island_index | the island index within the uv set |
|
static |
get the mapping from the vertex index in the mesh that was got by islandToMesh to the vertex index in the original mesh
uv_set | the uv set index |
island_index | the island index within the uv set |
|
static |
get the uv coordinate of the positional vertex in the island
uv_set | the uv set index |
island_index | the island index within the uv set |
vertex_index | the positional vertex index |
|
static |
get all seams across the mesh
|
static |
get the sharp edges across the mesh
|
static |
get the border around the islands when we pack it
|
static |
get the whole mesh from the paint/UV/Retopo room - in dependence on current room
|
static |
get the islands count over the current uv-set
uv_set | the uv-set index |
|
static |
get the mesh that contains the island, xy of each point is the UV coordinate. The mesh contains only one island
uv_set | the uv set index |
island_index | the island index within the uv set |
|
static |
get the mesh that contains the island, each point is the coordinate in space (not the uv coordinate!). The mesh contains only one island. The faces correspond to the faces of the mesh that was got by islandToMesh
uv_set | the uv set index |
island_index | the island index within the uv set |
|
static |
use the mesh (that was previously got by islandToMesh) to replace the island in the current uv-set
mesh | the mesh that was previously got by islandToMesh |
uv_set | the uv set index |
island_index | the island index within the uv set |
|
static |
pack the islands in the current uv-set
uv_set | the uv set index |
rotate | allow rotation while packing |
shuffle | shuffle the identical islands to avoid the exact overlapping |
|
static |
remove the seam from the mesh
start_vertex_index | the start positional vertex index |
end_vertex_index | the end positional vertex index |
|
static |
remove the sharp edge from the mesh
start_vertex_index | the start positional vertex index |
end_vertex_index | the end positional vertex index |
|
static |
|
static |
set the border around the islands when we pack it
distance | the border size in percents |
|
static |
unwrap the island using the ABF approach
uv_set | the uv set index |
island_index | the island index within the uv set |
|
static |
unwrap the island using the GU (Globally Uniform) approach
uv_set | the uv set index |
island_index | the island index within the uv set |
|
static |
unwrap the island using the LSCM approach
uv_set | the uv set index |
island_index | the island index within the uv set |
|
static |
unwrap the island using the Planar approach
uv_set | the uv set index |
island_index | the island index within the uv set |
|
static |
try to uwrap the island as the regular stripe
uv_set | the uv set index |
island_index | the island index within the uv set |
|
static |
move the island from one uv-set to another one
uv_set | the source uv set index |
island_index | the island index within the source uv set |
destination_uv_set | the destination uv set index |
|
static |
unwrap the current uv-set
uv_set | the uv set index |
|
static |
get the UV-sets count.