3DCoat Core API
The 3DCoat API documentation.
Loading...
Searching...
No Matches
coat::image Class Reference

image primitive More...

#include <CorePrimAPI.h>

Inheritance diagram for coat::image:
coat::text coat::prim

Classes

struct  ParamInfo
 Holds the general information about image parameters. More...
 

Public Member Functions

 image ()
 constructs a new image object.
 
imagetopTexture (const char *_texture)
 set the top texture
 
str topTexture () const
 get the top texture
 
imagetopBumpTexture (const char *_texture)
 set the top bump texture
 
str topBumpTexture () const
 get the top bump texture
 
imagebottomTexture (const char *_texture)
 set the bottom texture
 
str bottomTexture () const
 get the bottom texture
 
imagebottomBumpTexture (const char *_texture)
 set the bottom bump texture
 
str bottomBumpTexture () const
 get the bottom bump texture
 
imagestrencilTexture (const char *_texture)
 set the strencil texture
 
str strencilTexture () const
 get the strencil texture
 
imagebottomStrencilTexture (const char *_texture)
 set the bottom strencil texture
 
str bottomStrencilTexture () const
 get the bottom strencil texture
 
imagebasicThickness (const float &_thickness)
 set the basic thickness of image
 
float basicThickness () const
 get the basic thickness of image
 
imagebumpThickness (const float &_thickness)
 set the bump thickness of image
 
float bumpThickness () const
 get the bump thickness of image
 
imagetaperAngle (const float &_angle)
 set the angle of tapering
 
float taperAngle () const
 get the angle of tapering of image
 
imagetopBottomWeight (const float &weight)
 set the weight of the top and bottom image
 
float topBottomWeight () const
 get the weight of the top and bottom image
 
imagesizeInScene (const float &_size)
 set the size of image in the scene
 
float sizeInScene () const
 get the size of image in the scene
 
- Public Member Functions inherited from coat::text
 text ()
 constructs a new text object.
 
 text (const char *s)
 constructs a new text object.
 
textstring (const char *s)
 set the text's string.
 
str string () const
 get the text's string.
 
textfont (const Font &f)
 set the text font
 
Font font () const
 get the font object
 
textwidth (const float &w)
 set the text width in the pixels
 
float width () const
 get the text width
 
textdepth (const float &d)
 set the text depth in the pixels
 
float depth () const
 get the text depth
 
textbendRadius (const float &radius)
 set the bend radius.
 
float bendRadius () const
 get the bend radius.
 
textextraRotation (const float &rotation)
 set the rotate angle around the x-axis.
 
float extraRotation () const
 get the rotate angle around the x-axis.
 
textinvertBending (const bool &_binvert)
 set the invert of the text bending.
 
float invertBending () const
 get the invert of the text bending.
 
- Public Member Functions inherited from coat::prim
 prim ()
 constructs a new prim object.
 
str class_name ()
 get the primitive class name.
 
primname (const char *s)
 set the primitive object name.
 
str name () const
 get the primitive object name.
 
void add (Volume &v)
 add the prim into scene
 
void subtract (Volume &v)
 subtract the prim from scene
 
void intersect (Volume &v)
 intersect the prim into scene
 
void merge (Volume &v, const BoolOpType op)
 merge the prim into scene
 
Mesh mesh ()
 get the mesh prim
 
primcolor (DWORD CL)
 assign the color to the primitive (in voxels)
 
primcolor (float r, float g, float b, float a)
 assign the color to the primitive (in voxels)
 
primcolor (float r, float g, float b)
 assign the color to the primitive (in voxels)
 
primcolor (const char *colorid)
 assign the color to the primitive (in voxels)
 
primgloss (float value)
 assign the gloss for the voxel primitive, it will work only if the color already assigned
 
primroughness (float value)
 assign the roughness for the voxel primitive, it will work only if the color already assigned
 
primmetal (float value)
 the metalliclty value for the voxel primitive, it will work only if the color already assigned
 
primopacity (float value)
 assign the opacity of the color over the voxel primitive. The color should be assigned before you assign the opacity, for example p.color("red").opacity(0.5)
 
primdetails (const float det_level)
 set the detail level
 
float details ()
 get the detail level
 
primtransform (const mat4 &t)
 set the transform matrix
 
mat4 transform () const
 get the transform matrix
 
primscale (float scale)
 set the scale
 
primscale (const vec3 &v)
 set the scale
 
vec3 scale () const
 get the scale
 
primtranslate (const vec3 &_pos)
 Set the primitive translation.
 
vec3 translate () const
 get the primitive translation
 
primtranslate (float x, float y, float z)
 Set the primitive translation.
 
primx (float x)
 shift the primitive along the x - axis
 
primy (float y)
 shift the primitive along the y - axis
 
primz (float z)
 shift the primitive along the z - axis
 
primauto_divide (float average_div)
 set the auto devide
 
primstep_divide (float step)
 set the step devide
 
primfillet (float radius)
 set the fillet
 
template<typename T >
T & Obj ()
 Get the primitive object reference.
 
template<typename T >
bool isAs ()
 Check the prim's type.
 
virtual float fillet_relative ()
 calculates a fillet relative value (0..1).
 

Protected Member Functions

virtual cMeshContainer * create_mesh ()
 creates a mesh container for the image.
 
- Protected Member Functions inherited from coat::text
void update_mesh (cMeshContainer *mc)
 update the mesh container for the text.
 
- Protected Member Functions inherited from coat::prim
template<class T >
T & to_cast_this ()
 cast this prim to the obj type T
 
void merge_debug (Volume &vol, Mesh &mesh)
 merge the mesh debug into scene
 

Additional Inherited Members

- Static Public Member Functions inherited from coat::prim
static void debug_on (bool isOn=true)
 indicates whether to turn on or off the debug mode.
 
static void debug_clear ()
 clear the debug info for primitive operations
 
static void push_transform (const mat4 &t)
 set the global transform matrix to all primitives
 
static void push_translate (const vec3 &d)
 Set the translation to all primitives.
 
static void push_scale (float scale)
 Set the scale to all primitives.
 
static void push_scale (const vec3 &s)
 Set the scale to all primitives.
 
static void push_details (float details_modulator)
 set the detail level to all primitives
 
static void reset_transform ()
 reset the global transform matrix
 
- Protected Attributes inherited from coat::prim
prim_this
 

Detailed Description

image primitive

Examples
Logo3D.cpp.

Member Function Documentation

◆ basicThickness() [1/2]

float coat::image::basicThickness ( ) const

get the basic thickness of image

Returns
the thickness value

◆ basicThickness() [2/2]

image & coat::image::basicThickness ( const float & _thickness)

set the basic thickness of image

Parameters
_thicknessthickness value
Returns
the image reference
Examples
Logo3D.cpp.

◆ bottomBumpTexture() [1/2]

str coat::image::bottomBumpTexture ( ) const

get the bottom bump texture

Returns
the string of the image file name

◆ bottomBumpTexture() [2/2]

image & coat::image::bottomBumpTexture ( const char * _texture)

set the bottom bump texture

Parameters
_textureimage file name
Returns
the image reference

◆ bottomStrencilTexture() [1/2]

str coat::image::bottomStrencilTexture ( ) const

get the bottom strencil texture

Returns
the string of the image file name

◆ bottomStrencilTexture() [2/2]

image & coat::image::bottomStrencilTexture ( const char * _texture)

set the bottom strencil texture

Parameters
_textureimage file name
Returns
the image reference

◆ bottomTexture() [1/2]

str coat::image::bottomTexture ( ) const

get the bottom texture

Returns
the string of the image file name

◆ bottomTexture() [2/2]

image & coat::image::bottomTexture ( const char * _texture)

set the bottom texture

Parameters
_textureimage file name
Returns
the image reference

◆ bumpThickness() [1/2]

float coat::image::bumpThickness ( ) const

get the bump thickness of image

Returns
the thickness value

◆ bumpThickness() [2/2]

image & coat::image::bumpThickness ( const float & _thickness)

set the bump thickness of image

Parameters
_thicknessthickness value
Returns
the image reference
Examples
Logo3D.cpp.

◆ create_mesh()

virtual cMeshContainer * coat::image::create_mesh ( )
protectedvirtual

creates a mesh container for the image.

Returns
mesh pointer

Reimplemented from coat::text.

◆ sizeInScene() [1/2]

float coat::image::sizeInScene ( ) const

get the size of image in the scene

Returns
the size value

◆ sizeInScene() [2/2]

image & coat::image::sizeInScene ( const float & _size)

set the size of image in the scene

Parameters
_sizesize value
Returns
the image reference

◆ strencilTexture() [1/2]

str coat::image::strencilTexture ( ) const

get the strencil texture

Returns
the string of the image file name

◆ strencilTexture() [2/2]

image & coat::image::strencilTexture ( const char * _texture)

set the strencil texture

Parameters
_textureimage file name
Returns
the image reference

◆ taperAngle() [1/2]

float coat::image::taperAngle ( ) const

get the angle of tapering of image

Returns
the taper angle value

◆ taperAngle() [2/2]

image & coat::image::taperAngle ( const float & _angle)

set the angle of tapering

Parameters
_angletaper angle value
Returns
the image reference

◆ topBottomWeight() [1/2]

float coat::image::topBottomWeight ( ) const

get the weight of the top and bottom image

Returns
the weight value

◆ topBottomWeight() [2/2]

image & coat::image::topBottomWeight ( const float & weight)

set the weight of the top and bottom image

Parameters
weightweight value
Returns
the image reference

◆ topBumpTexture() [1/2]

str coat::image::topBumpTexture ( ) const

get the top bump texture

Returns
the string of the image file name

◆ topBumpTexture() [2/2]

image & coat::image::topBumpTexture ( const char * _texture)

set the top bump texture

Parameters
_textureimage file name
Returns
the image reference
Examples
Logo3D.cpp.

◆ topTexture() [1/2]

str coat::image::topTexture ( ) const

get the top texture

Returns
the string of the image file name

◆ topTexture() [2/2]

image & coat::image::topTexture ( const char * _texture)

set the top texture

Parameters
_textureimage file name
Returns
the image reference
Examples
Logo3D.cpp.

The documentation for this class was generated from the following file: