3DCoat Core API
The 3DCoat API documentation.
No Matches

This example generates the nut primitive.

// This example generates the nut primitive.
#include <CoreAPI.h>
using namespace coat;
//@config: Debug
int main() {
// get to sculpt room
// add new volume
auto current = coat::Scene::sculptRoot().addChild("nut"+coat::str::ToString(voxId));
auto volume = current.Volume();
// turn to surface
// make the hexa nut primitive with spicified parameters and add it into scene
return 0;
Definition CorePrimAPI.h:2876
int childCount() const
returns the child elements count
SceneElement addChild(const char *name) const
add the child element of the same nature
static SceneElement sculptRoot()
get the root of all sculpt objects
nut primitive
Definition CorePrimAPI.h:3333
nut & threadDiameter(const float &d)
set the hole thread diameter.
nut & threadType(const int &_t)
set the nut thread profile.
nut & setTypeData(void *data)
set the typed data.
nut & pitch(const float &p)
set the thread pitch.
prim & details(const float det_level)
set the detail level
void add(Volume &v)
add the prim into scene
static void toRoom(const char *name, bool Force=false)
switch to the room
The coat namespace used for most 3DCoat API calls except low-level internal structures.
Definition CoreAPI.h:43