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

This example generates the surface consist of logo 3D picture

// This example generates the surface consist of logo 3D picture
#include <CoreAPI.h>
using namespace coat;
int main() {
// create new volume, don't need to set density as in voxels
auto scene = Scene::sculptRoot().addChild("Logo3D");
// get the volume object to refer later
auto volume = scene.Volume();
// turn to surface mode
// get the file name of the top texture and top bump texture
str file = io::toFullPathInInstallFolder("/UserPrefs/CoreAPI/.coredox/images/logo_400x400.png");
// add the image primitive with basic and bump thickness equals 10, primitive width = 256 and primitive depth = 16
return 0;
image primitive
Definition CorePrimAPI.h:1926
image & topTexture(const char *_texture)
set the top texture
image & topBumpTexture(const char *_texture)
set the top bump texture
image & bumpThickness(const float &_thickness)
set the bump thickness of image
image & basicThickness(const float &_thickness)
set the basic thickness of image
void add(Volume &v)
add the prim into scene
text & depth(const float &d)
set the text depth in the pixels
text & width(const float &w)
set the text width in the pixels
The coat namespace used for most 3DCoat API calls except low-level internal structures.
Definition CoreAPI.h:14
comms::cStr str
the string that is compatible with the 3DCoat engine, see the cStr
Definition CoreAPI.h:34