PaintTool.kl¶
Interfaces¶
PaintTool (interface)¶
バージョン 2.0 で追加.
PaintTool is the interface for Painting tools.
注釈
This is a work in progress, needs to be generalized to abstract the type of attribute being painted.
参考
BasePaintTool, RTRBasePaintTool
Functions¶
Vec3 | computeDisplacementDir ? ( in Ref<PolygonMesh> mesh ) |
ensureAttributeExists ! ( io Ref<Geometry> geometry, in Boolean resetValues ) | |
paintPolygons ! ( io Ref<PolygonMesh> mesh, in GeometryLocation location ) | |
Ref<Geometry> | rayCast ! ( io MouseEvent mouseEvent, io GeometryLocation location, io Mat44 transform, io Vec3 position ) |
reset ! () | |
setPointAttribute ! ( in Index i, in Float32 weight, in Vec3 displacementDir, io Ref<PolygonMesh> mesh ) | |
smoothPointAttribute ! ( in Index i, in Float32 weight, in Vec3 displacementDir, io Ref<PolygonMesh> mesh ) | |
toolTransformChanged ! ( in Mat44 transform ) |
Functions in detail¶
Vec3 PaintTool.computeDisplacementDir? ( in Ref<PolygonMesh> mesh )
Computes the average normal direction within a certain radius around of a hit-point.
PaintTool.ensureAttributeExists! ( io Ref<Geometry> geometry, in Boolean resetValues )
Creates or resets the geometry attributes.
PaintTool.paintPolygons! ( io Ref<PolygonMesh> mesh, in GeometryLocation location )
Paints polygons mesh attributes.
Ref<Geometry> PaintTool.rayCast! ( io MouseEvent mouseEvent, io GeometryLocation location, io Mat44 transform, io Vec3 position )
Casts a ray in the scene and gets the hit geometry. Returns null if not hit.
PaintTool.reset! ()
Resets all the geometry attributes used for painting.
PaintTool.setPointAttribute! ( in Index i, in Float32 weight, in Vec3 displacementDir, io Ref<PolygonMesh> mesh )
Sets the point attributes of a polygons mesh. The type of attributes depends of the tool : (position + normal for sculpting, color for paiting).
PaintTool.smoothPointAttribute! ( in Index i, in Float32 weight, in Vec3 displacementDir, io Ref<PolygonMesh> mesh )
Smooths the point attributes of a polygons mesh.
PaintTool.toolTransformChanged! ( in Mat44 transform )
Updates the transformation (position and orientation).