3DCoatScripting  4.8.31β
С помощью скриптинга можно управлять возможностями Коута и расширять его функционал.
Класс coat::scripto::ToolsMeshTransform

Access to transformation of mesh. Подробнее...

Базовые классы:coat::scripto::ToolsMeshX.

Открытые члены

 ToolsMeshTransform ()
 Create a transformation tool.
 
 a ({{comms::cMat4::Identity}})
 
virtual void run () override
 Start a transformation!
 
const About & about () const
 
ToolsMeshTransformposition (const Vec3 &c)
 Setter for position.
 
Vec3 position () const
 Getter for position.
 
ToolsMeshTransformrotation (const Angles &r)
 Setter for rotation.
 
Angles rotation () const
 Getter for rotation.
 
ToolsMeshTransformscale (const Vec3 &s)
 Setter for scale.
 
Vec3 scale () const
 Getter for scale.
 
- Открытые члены inherited from coat::scripto::ToolsMeshX
 ToolsMeshX (Mesh *mesh)
 
- Открытые члены inherited from coat::scripto::ToolsX
void operator() ()
 run()
 

Защищенные данные

About a
 

Подробное описание

Access to transformation of mesh.

    SculptRoom  sculpt;

    // grab from named layer
    // if absent then take current
    Mesh  a( "Layer A" );
    auto  transform = a.tools().transform();

    // get & set & add to scene
    const int  N = 4;
    for ( int i = 0; i < N; ++i ) {
        const Vec3    translation = transform.position() + Vec3::rand( -48, 48 );
        const Angles  angles = transform.rotation() + Angles::rand( -48, 48 );
        transform
          .position( translation )
          .rotation( angles )
          ();
        sculpt += a;
    }