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

washer primitive More...

#include <CorePrimAPI.h>

Inheritance diagram for coat::washer:
coat::prim

Public Types

enum  Type {
  None = -1 , Flat = 0 , Grover = 1 , Plate = 2 ,
  Wave = 3 , Quard = 4 , Sphere = 5 , Conus = 6 ,
  Springlock = 7
}
 enumeration the types of the washer
 

Public Member Functions

 washer ()
 constructor.
 
washerinnerDiameter (const float &_d)
 set the inner diameter.
 
float innerDiameter () const
 get the inner diameter.
 
washerouterDiameter (const float &_d)
 set the outer diameter.
 
float outerDiameter () const
 get the outer diameter.
 
washerconusDiameter (const float &_d)
 set the diameter of the conus washer.
 
float conusDiameter () const
 get the diameter of the conus washer.
 
washerthickness (const float &_s)
 set the washer thickness.
 
float thickness () const
 get the washer thickness.
 
washerheight (const float &_h)
 set the washer height.
 
float height () const
 get the washer height.
 
washerfacet (const bool &_f)
 indicates the facet usage.
 
bool facet () const
 get the facet flag.
 
washertype (washer::Type _t)
 set the washer type.
 
washer::Type type () const
 get the washer type.
 
- 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 washer.
 
- 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

washer primitive

Examples
washer.cpp.

Member Function Documentation

◆ conusDiameter() [1/2]

float coat::washer::conusDiameter ( ) const

get the diameter of the conus washer.

Returns
diameter

◆ conusDiameter() [2/2]

washer & coat::washer::conusDiameter ( const float & _d)

set the diameter of the conus washer.

Parameters
_ddiameter
Returns
washer reference

◆ create_mesh()

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

creates a mesh container for the washer.

Returns
mesh pointer

Reimplemented from coat::prim.

◆ facet() [1/2]

bool coat::washer::facet ( ) const

get the facet flag.

Returns
facet flag value

◆ facet() [2/2]

washer & coat::washer::facet ( const bool & _f)

indicates the facet usage.

Parameters
_ffacet flag
Returns
washer reference
Examples
washer.cpp.

◆ height() [1/2]

float coat::washer::height ( ) const

get the washer height.

Returns
height value

◆ height() [2/2]

washer & coat::washer::height ( const float & _h)

set the washer height.

Parameters
_hheight value
Returns
washer reference
Examples
washer.cpp.

◆ innerDiameter() [1/2]

float coat::washer::innerDiameter ( ) const

get the inner diameter.

Returns
diameter

◆ innerDiameter() [2/2]

washer & coat::washer::innerDiameter ( const float & _d)

set the inner diameter.

Parameters
_ddiameter
Returns
washer reference
Examples
washer.cpp.

◆ outerDiameter() [1/2]

float coat::washer::outerDiameter ( ) const

get the outer diameter.

Returns
diameter

◆ outerDiameter() [2/2]

washer & coat::washer::outerDiameter ( const float & _d)

set the outer diameter.

Parameters
_ddiameter
Returns
washer reference
Examples
washer.cpp.

◆ thickness() [1/2]

float coat::washer::thickness ( ) const

get the washer thickness.

Returns
thickness value

◆ thickness() [2/2]

washer & coat::washer::thickness ( const float & _s)

set the washer thickness.

Parameters
_sthickness value
Returns
washer reference
Examples
washer.cpp.

◆ type() [1/2]

washer::Type coat::washer::type ( ) const

get the washer type.

Returns
type value

◆ type() [2/2]

washer & coat::washer::type ( washer::Type _t)

set the washer type.

Parameters
_ttype value
Returns
washer reference
Examples
washer.cpp.

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