This example generates the surface figure rolling pin that consists of cylinders
#include <CoreAPI.h>
EXPORT
int main() {
auto volume = current.
Volume();
volume.toSurface();
float height = 100;
float radius = 12;
float fillet = 0.5;
float rotate = 90;
float fscale = 4;
matrix *= coat::mat4::RotationZ(rotate);
matrix *= coat::mat4::RotationZ(rotate);
return 0;
}
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
The cylinder.
Definition CorePrimAPI.h:876
static void reset_transform()
reset the global transform matrix
static void push_translate(const vec3 &d)
Set the translation to all primitives.
prim & translate(const vec3 &_pos)
Set the primitive translation.
void add(Volume &v)
add the prim into scene
prim & transform(const mat4 &t)
set the transform matrix
prim & scale(float scale)
set the scale
static void toRoom(const char *name, bool Force=false)
switch to the room
comms::cVec3 vec3
3D - float vector, see the cVec3
Definition CoreAPI.h:50
comms::cMat4 mat4
4x4 float matrix, see the cMat4
Definition CoreAPI.h:59