DATAKIT SDK  V2026.4
_3dxmlw::WriteParameters Class Reference

This class provides several parameters to tunes 3dxml Writter.
It must be provided to addInstance3D method. More...

Public Member Functions

void ClearMaterial ()
 Clears material parameters for the written instance node. More...
 
Dtk_Int32 GetBlankedStatus () const
 Retrieve the Written blanked status. More...
 
Dtk_RGB GetColor () const
 Retrieve the Written color. More...
 
Dtk_Double64 GetCurveThickness () const
 Retrieve the Written curve thickness. More...
 
Dtk_FontLineType GetCurveType () const
 Retrieve the Written curve type. More...
 
Dtk_Double64 GetMaterialAmbient () const
 
Dtk_RGB GetMaterialAmbientColor () const
 
Dtk_Double64 GetMaterialDiffuse () const
 
Dtk_RGB GetMaterialDiffuseColor () const
 
Dtk_string GetMaterialName () const
 
Dtk_Double64 GetMaterialReflectivity () const
 
Dtk_Double64 GetMaterialRefraction () const
 
Dtk_Double64 GetMaterialSpecular () const
 
Dtk_RGB GetMaterialSpecularColor () const
 
Dtk_Double64 GetMaterialTransparency () const
 
Dtk_bool HasMaterial () const
 Returns whether a material was actually set on this instance. More...
 
void SetBlankedStatus (const Dtk_Int32 inBlanked)
 Sets the blanked status for the written instance node. More...
 
void SetColor (const Dtk_RGB &inColor)
 Sets the color for the written instance node. More...
 
void SetCurveThickness (Dtk_Double64 inCurveThickness)
 Sets the curve thickness for the written instance node. More...
 
void SetCurveType (Dtk_FontLineType inCurveType)
 Sets the curve type for the written instance node. More...
 
void SetMaterial (const Dtk_string &inMaterialName, const Dtk_RGB &inAmbientColor=Dtk_RGB(), const Dtk_RGB &inDiffuseColor=Dtk_RGB(), const Dtk_RGB &inSpecularColor=Dtk_RGB(), Dtk_Double64 inAmbient=0, Dtk_Double64 inDiffuse=0, Dtk_Double64 inSpecular=0, Dtk_Double64 inRefraction=0, Dtk_Double64 inTransparency=0, Dtk_Double64 inReflectivity=0)
 Sets material parameters to be applied on the written instance node. More...
 
 WriteParameters ()
 Default constructor. More...
 
 ~WriteParameters ()
 Destructor. More...
 

Protected Attributes

Dtk_Int32 _Blanked
 
Dtk_RGB _Color
 
Dtk_Double64 _CurveThickness
 
Dtk_FontLineType _CurveType
 
Dtk_bool _HasMaterial
 
Dtk_Double64 _MaterialAmbient
 
Dtk_RGB _MaterialAmbientColor
 
Dtk_Double64 _MaterialDiffuse
 
Dtk_RGB _MaterialDiffuseColor
 
Dtk_string _MaterialName
 
Dtk_Double64 _MaterialReflectivity
 
Dtk_Double64 _MaterialRefraction
 
Dtk_Double64 _MaterialSpecular
 
Dtk_RGB _MaterialSpecularColor
 
Dtk_Double64 _MaterialTransparency
 

Detailed Description

This class provides several parameters to tunes 3dxml Writter.
It must be provided to addInstance3D method.

//...

Constructor & Destructor Documentation

◆ WriteParameters()

_3dxmlw::WriteParameters::WriteParameters ( )

Default constructor.

35  :_Blanked(0)
37  , _Color( Dtk_RGB() )
38  , _CurveThickness( 0 )
39  , _HasMaterial( false )
40  , _MaterialName( L"" )
41  , _MaterialAmbient( 0 )
42  , _MaterialDiffuse( 0 )
43  , _MaterialSpecular( 0 )
44  , _MaterialRefraction( 0 )
50  {
51  }

◆ ~WriteParameters()

_3dxmlw::WriteParameters::~WriteParameters ( )

Destructor.

55  {
56  }

Member Function Documentation

◆ ClearMaterial()

void _3dxmlw::WriteParameters::ClearMaterial ( )

Clears material parameters for the written instance node.

130  {
131  _HasMaterial = false;
132  _MaterialName = L"";
133  }

◆ GetBlankedStatus()

Dtk_Int32 _3dxmlw::WriteParameters::GetBlankedStatus ( ) const

Retrieve the Written blanked status.

66  {
67  return _Blanked;
68  }

◆ GetColor()

Dtk_RGB _3dxmlw::WriteParameters::GetColor ( ) const

Retrieve the Written color.

77  {
78  return _Color;
79  }

◆ GetCurveThickness()

Dtk_Double64 _3dxmlw::WriteParameters::GetCurveThickness ( ) const

Retrieve the Written curve thickness.

99  {
100  return _CurveThickness;
101  }

◆ GetCurveType()

Dtk_FontLineType _3dxmlw::WriteParameters::GetCurveType ( ) const

Retrieve the Written curve type.

88  {
89  return _CurveType;
90  }

◆ GetMaterialAmbient()

Dtk_Double64 _3dxmlw::WriteParameters::GetMaterialAmbient ( ) const
140 { return _MaterialAmbient; }

◆ GetMaterialAmbientColor()

Dtk_RGB _3dxmlw::WriteParameters::GetMaterialAmbientColor ( ) const
146 { return _MaterialAmbientColor; }

◆ GetMaterialDiffuse()

Dtk_Double64 _3dxmlw::WriteParameters::GetMaterialDiffuse ( ) const
141 { return _MaterialDiffuse; }

◆ GetMaterialDiffuseColor()

Dtk_RGB _3dxmlw::WriteParameters::GetMaterialDiffuseColor ( ) const
147 { return _MaterialDiffuseColor; }

◆ GetMaterialName()

Dtk_string _3dxmlw::WriteParameters::GetMaterialName ( ) const
139 { return _MaterialName; }

◆ GetMaterialReflectivity()

Dtk_Double64 _3dxmlw::WriteParameters::GetMaterialReflectivity ( ) const
145 { return _MaterialReflectivity; }

◆ GetMaterialRefraction()

Dtk_Double64 _3dxmlw::WriteParameters::GetMaterialRefraction ( ) const
143 { return _MaterialRefraction; }

◆ GetMaterialSpecular()

Dtk_Double64 _3dxmlw::WriteParameters::GetMaterialSpecular ( ) const
142 { return _MaterialSpecular; }

◆ GetMaterialSpecularColor()

Dtk_RGB _3dxmlw::WriteParameters::GetMaterialSpecularColor ( ) const
148 { return _MaterialSpecularColor; }

◆ GetMaterialTransparency()

Dtk_Double64 _3dxmlw::WriteParameters::GetMaterialTransparency ( ) const
144 { return _MaterialTransparency; }

◆ HasMaterial()

Dtk_bool _3dxmlw::WriteParameters::HasMaterial ( ) const

Returns whether a material was actually set on this instance.

Remarks
Guards against a stale/garbage _HasMaterial flag: a material is only considered present if a non-empty material name was actually provided via SetMaterial().
138 { return _HasMaterial && !_MaterialName.is_NULL() && _MaterialName.len() > 0; }

◆ SetBlankedStatus()

void _3dxmlw::WriteParameters::SetBlankedStatus ( const Dtk_Int32  inBlanked)

Sets the blanked status for the written instance node.

Parameters
[in]inBlanked: blanked status.
61  {
62  _Blanked = inBlanked;
63  }

◆ SetColor()

void _3dxmlw::WriteParameters::SetColor ( const Dtk_RGB &  inColor)

Sets the color for the written instance node.

Parameters
[in]inColor: color.
72  {
73  _Color = inColor;
74  }

◆ SetCurveThickness()

void _3dxmlw::WriteParameters::SetCurveThickness ( Dtk_Double64  inCurveThickness)

Sets the curve thickness for the written instance node.

Parameters
[in]inCurveThickness: curve thickness.
94  {
95  _CurveThickness = inCurveThickness;
96  }

◆ SetCurveType()

void _3dxmlw::WriteParameters::SetCurveType ( Dtk_FontLineType  inCurveType)

Sets the curve type for the written instance node.

Parameters
[in]inCurvetype: curve type.
83  {
84  _CurveType = inCurveType;
85  }

◆ SetMaterial()

void _3dxmlw::WriteParameters::SetMaterial ( const Dtk_string &  inMaterialName,
const Dtk_RGB &  inAmbientColor = Dtk_RGB(),
const Dtk_RGB &  inDiffuseColor = Dtk_RGB(),
const Dtk_RGB &  inSpecularColor = Dtk_RGB(),
Dtk_Double64  inAmbient = 0,
Dtk_Double64  inDiffuse = 0,
Dtk_Double64  inSpecular = 0,
Dtk_Double64  inRefraction = 0,
Dtk_Double64  inTransparency = 0,
Dtk_Double64  inReflectivity = 0 
)

Sets material parameters to be applied on the written instance node.

114  {
115  _HasMaterial = true;
116  _MaterialName = inMaterialName;
117  _MaterialAmbientColor = inAmbientColor;
118  _MaterialDiffuseColor = inDiffuseColor;
119  _MaterialSpecularColor = inSpecularColor;
120  _MaterialAmbient = inAmbient;
121  _MaterialDiffuse = inDiffuse;
122  _MaterialSpecular = inSpecular;
123  _MaterialRefraction = inRefraction;
124  _MaterialTransparency = inTransparency;
125  _MaterialReflectivity = inReflectivity;
126  }

Field Documentation

◆ _Blanked

Dtk_Int32 _3dxmlw::WriteParameters::_Blanked
protected

◆ _Color

Dtk_RGB _3dxmlw::WriteParameters::_Color
protected

◆ _CurveThickness

Dtk_Double64 _3dxmlw::WriteParameters::_CurveThickness
protected

◆ _CurveType

Dtk_FontLineType _3dxmlw::WriteParameters::_CurveType
protected

◆ _HasMaterial

Dtk_bool _3dxmlw::WriteParameters::_HasMaterial
protected

◆ _MaterialAmbient

Dtk_Double64 _3dxmlw::WriteParameters::_MaterialAmbient
protected

◆ _MaterialAmbientColor

Dtk_RGB _3dxmlw::WriteParameters::_MaterialAmbientColor
protected

◆ _MaterialDiffuse

Dtk_Double64 _3dxmlw::WriteParameters::_MaterialDiffuse
protected

◆ _MaterialDiffuseColor

Dtk_RGB _3dxmlw::WriteParameters::_MaterialDiffuseColor
protected

◆ _MaterialName

Dtk_string _3dxmlw::WriteParameters::_MaterialName
protected

◆ _MaterialReflectivity

Dtk_Double64 _3dxmlw::WriteParameters::_MaterialReflectivity
protected

◆ _MaterialRefraction

Dtk_Double64 _3dxmlw::WriteParameters::_MaterialRefraction
protected

◆ _MaterialSpecular

Dtk_Double64 _3dxmlw::WriteParameters::_MaterialSpecular
protected

◆ _MaterialSpecularColor

Dtk_RGB _3dxmlw::WriteParameters::_MaterialSpecularColor
protected

◆ _MaterialTransparency

Dtk_Double64 _3dxmlw::WriteParameters::_MaterialTransparency
protected
_3dxmlw::WriteParameters::_MaterialSpecularColor
Dtk_RGB _MaterialSpecularColor
Definition: 3dxmlw.hpp:31
_3dxmlw::WriteParameters::_MaterialAmbient
Dtk_Double64 _MaterialAmbient
Definition: 3dxmlw.hpp:23
_3dxmlw::WriteParameters::_MaterialReflectivity
Dtk_Double64 _MaterialReflectivity
Definition: 3dxmlw.hpp:28
_3dxmlw::WriteParameters::_MaterialTransparency
Dtk_Double64 _MaterialTransparency
Definition: 3dxmlw.hpp:27
_3dxmlw::WriteParameters::_MaterialRefraction
Dtk_Double64 _MaterialRefraction
Definition: 3dxmlw.hpp:26
_3dxmlw::WriteParameters::_MaterialAmbientColor
Dtk_RGB _MaterialAmbientColor
Definition: 3dxmlw.hpp:29
_3dxmlw::WriteParameters::_MaterialDiffuseColor
Dtk_RGB _MaterialDiffuseColor
Definition: 3dxmlw.hpp:30
_3dxmlw::WriteParameters::_MaterialDiffuse
Dtk_Double64 _MaterialDiffuse
Definition: 3dxmlw.hpp:24
_3dxmlw::WriteParameters::_HasMaterial
Dtk_bool _HasMaterial
Definition: 3dxmlw.hpp:21
_3dxmlw::WriteParameters::_CurveThickness
Dtk_Double64 _CurveThickness
Definition: 3dxmlw.hpp:20
_3dxmlw::WriteParameters::_MaterialName
Dtk_string _MaterialName
Definition: 3dxmlw.hpp:22
_3dxmlw::WriteParameters::_Color
Dtk_RGB _Color
Definition: 3dxmlw.hpp:19
_3dxmlw::WriteParameters::_CurveType
Dtk_FontLineType _CurveType
Definition: 3dxmlw.hpp:18
_3dxmlw::WriteParameters::_MaterialSpecular
Dtk_Double64 _MaterialSpecular
Definition: 3dxmlw.hpp:25
Dtk_string::is_NULL
Dtk_bool is_NULL() const
DTK_NO_PATTERN
@ DTK_NO_PATTERN
Definition: util_ent_dtk.hpp:47
_3dxmlw::WriteParameters::_Blanked
Dtk_Int32 _Blanked
Definition: 3dxmlw.hpp:17
Dtk_string::len
int len() const
Retrieve the length of the Dtk_string.
Dtk_RGB
Definition: dtk_rgb.hpp:8