DrawingHandle (object)¶
バージョン 1.13.0 で追加.
The DrawingHandle is used to manage the lifetime of drawn objects.
The InlineDrawing system uses a singleton to store the data submitted to rendering. This makes adding data to the renderer easy, but removing data can be difficult. Often we want data to be removed when its owner is destroyed. The owner might be a node in Maya for example. By adding the DrawingHandle as a member of a splice node, any drawn elements associated with the handle will be automatically cleaned up when the Splice node is destroyed.
When the DrawingHandle is used within Canvas, the visual programming system, the DrawingHandle is stored in a singleton, outside of the graph. You will need to call DrawingHandle.clear to remove its content from the drawing. So you should use the DrawingHandle.clear node prior to any draw nodes when using it in Canvas.
In InlineDrawing, any InlineEntity (InlineTranform, InlineShape, InlineInstance) are registered with an unique-id as a String (unique-name). It allows to re-use the same entity over consecutive draws without destroying it even if it content has changed. However, this approach has two drawbacks: – If several entities share the same unique-id, the last entity overwrites the others when the drawing happens. – The DrawingHandle methods need a specific parameter (String) to set the unique-id of the entities it needs to construct.
In the 2.4 version, a new framework, called accumulateDraw, has been introduced in DrawingHandle to prevent the need of specifying a unique-id. Each DrawingHandle.drawXXX methods has its “accumulate” counterpart under the name DrawingHandle.accumulateDrawXXX where the unique-ids are automatically constructed. However, each entity needs to be destroyed when the drawing is done, that make the render slower.
/*
** Example: DrawingHandle
*/
require InlineDrawing;
operator entry() {
// Create a handle to manage the lifetime of the drawn elements
DrawingHandle handle();
if(handle.isEmpty()) {
InlineDrawing drawing = handle.getDrawing();
// create a couple of transforms parented into a hierarchy attached to the handle.
InlineTransform rootTransform = handle.getRootTransform();
InlineTransform transfo1 = StaticInlineTransform('parent', rootTransform, Xfo());
InlineTransform transfo2 = StaticInlineTransform('childA', transfo1, Xfo(Vec3(-5, 0, 0)));
InlineTransform transfo3 = StaticInlineTransform('childB', transfo1, Xfo(Vec3(5, 0, 0)));
// Attach some points to transfo2
InlineShader flatShader = drawing.registerShader(OGLFlatShader);
InlineShader surfaceShader = drawing.registerShader(OGLSurfaceShader);
InlineMaterial pointsMaterial = flatShader.getOrCreateMaterial("points");
pointsMaterial.setUniform('u_color', Color(1.0, 0.0, 0.0));
Points points();
InlinePointsShape pointsShape("points", points);
InlineInstance pointsdInstance = InlineInstance("points", transfo2, pointsShape, pointsMaterial);
// Attach a mesh to transfo3
InlineMaterial surfaceMaterial = surfaceShader.getOrCreateMaterial("surface");
surfaceMaterial.setUniform('u_diffuseColor', Color(1.0, 1.0, 0.0));
PolygonMesh mesh();
InlineMeshShape meshShape("mesh", mesh);
InlineInstance meshInstance = InlineInstance("mesh", transfo3, meshShape, surfaceMaterial);
}
// hide the drawing
handle.setVisibility(false);
// make it visible again
handle.setVisibility(true);
// Later.... Destroy the handle. The hierarch containing the points and mesh will be removed from the InlineDrawing system
handle = null;
}
/*
** Output:
*/
Methods¶
DrawingHandle ( in DrawingHandle other ) | |
DrawingHandle ( in String name ) | |
DrawingHandle () | |
accumulateDraw2DText ! ( in FilePath fontPath, in UInt32 fontSize, in String text, in Vec2 screenPosition, in Color textColor, out InlineInstance instance ) | |
accumulateDraw2DTextArray ! ( in FilePath fontPath, in UInt32 fontSize, in String text[], in Vec2 screenPositions[], in Color textColor[], out InlineInstance instance ) | |
accumulateDraw3DText ! ( in FilePath fontPath, in UInt32 fontSize, in String text, in Vec3 worldPosition, in Color textColor, out InlineInstance instance ) | |
accumulateDraw3DTextArray ! ( in FilePath fontPath, in UInt32 fontSize, in String text[], in Vec3 worldPositions[], in Color textColor[], out InlineInstance instance ) | |
accumulateDrawColoredCurves ! ( in Xfo transform, in Curves curves, in Color specular, in Float32 specFactor, out InlineInstance instance ) | |
accumulateDrawColoredCurvesInstances ! ( in Xfo transforms[], in Curves curves, in Color specular, in Float32 specFactor, out InlineInstance instance ) | |
accumulateDrawColoredLines ! ( in Xfo transform, in Lines lines, out InlineInstance instance ) | |
accumulateDrawColoredLinesInstances ! ( in Xfo transforms[], in Lines lines, out InlineInstance instance ) | |
accumulateDrawColoredPolygonMesh ! ( in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out InlineInstance instance ) | |
accumulateDrawColoredPolygonMeshInstances ! ( in Color color, in Color specular, in Float32 specFactor, in Xfo transforms[], in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out InlineInstance instance ) | |
accumulateDrawCurves ! ( in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in Curves curves, out InlineInstance instance ) | |
accumulateDrawCurvesInstances ! ( in Color color, in Color specular, in Float32 specFactor, in Xfo transforms[], in Curves curves, out InlineInstance instance ) | |
accumulateDrawLines ! ( in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in Lines lines, out InlineInstance instance ) | |
accumulateDrawLinesArray ! ( in Color color, in Lines masters[], in Xfo transforms[], in Index indices[], out InlineInstance instance ) | |
accumulateDrawLinesInstances ! ( in Color color, in Xfo transforms[], in Lines lines, out InlineInstance instance ) | |
accumulateDrawPoints ! ( in Xfo transform, in Points points, out InlineInstance instance ) | |
accumulateDrawPointsArray ! ( in Points masters[], in Xfo transforms[], in Index indices[], out InlineInstance instance ) | |
accumulateDrawPointsInstances ! ( in Xfo transforms[], in Points points, out InlineInstance instance ) | |
accumulateDrawPolygonMesh ! ( in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out InlineInstance instance ) | |
accumulateDrawPolygonMeshArray ! ( in Color color, in Color specular, in Float32 specFactor, in PolygonMesh masters[], in Xfo transforms[], in Index indices[], in Boolean wireFrame, in Boolean doubleSided, out InlineInstance instance ) | |
accumulateDrawPolygonMeshInstances ! ( in Color color, in Color specular, in Float32 specFactor, in Xfo transforms[], in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out InlineInstance instance ) | |
accumulateDrawTexturedPlane ! ( in UInt32 width, in UInt32 height, in Color pixels[], in Boolean mirrorU, in Boolean mirrorV, in Boolean discardAlpha, in Xfo transform, out InlineInstance instance ) | |
accumulateDrawTexturedPlane ! ( in UInt32 width, in UInt32 height, in Float32 pixels[], in Boolean mirrorU, in Boolean mirrorV, in Boolean discardAlpha, in Xfo transform, out InlineInstance instance ) | |
accumulateDrawTexturedPolygonMesh ! ( in String filePath, in Color specular, in Float32 specFactor, in Color ambient, in Xfo transform, in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out InlineInstance instance ) | |
accumulateDrawTexturedPolygonMeshInstances ! ( in String filePath, in Color specular, in Float32 specFactor, in Color ambient, in Xfo transforms[], in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out InlineInstance instance ) | |
clear ! () | |
DrawingHandle | clone ? () |
draw2DText ! ( in FilePath fontPath, in UInt32 fontSize, in String text, in Vec2 screenPosition, in Color textColor, out InlineInstance instance ) | |
draw2DTextArray ! ( in FilePath fontPath, in UInt32 fontSize, in String text[], in Vec2 screenPositions[], in Color textColor[], out InlineInstance instance ) | |
draw3DText ! ( in FilePath fontPath, in UInt32 fontSize, in String text, in Vec3 worldPosition, in Color textColor, out InlineInstance instance ) | |
draw3DTextArray ! ( in FilePath fontPath, in UInt32 fontSize, in String text[], in Vec3 worldPositions[], in Color textColor[], out InlineInstance instance ) | |
drawAttributeAsAxes ! ( in Geometry geometry, in String attribute, in Xfo xfo, in Float32 scale, in Boolean local, out InlineInstance instance ) | |
drawAttributeAsColor ! ( in Geometry geometry, in String attribute, in Xfo xfo, in Float32 radius, out InlineInstance instance ) | |
drawAttributeAsFloat32 ! ( in Geometry geometry, in String attribute, in Xfo xfo, in Float32 minValue, in Float32 maxValue, in Float32 minRadius, in Float32 maxRadius, in Color minColor, in Color maxColor, out InlineInstance instance ) | |
drawAttributeAsPosition ! ( in Geometry geometry, in String attribute, in Xfo xfo, in Color color, in Float32 radius, out InlineInstance instance ) | |
drawAttributeAsText ! ( in FilePath fontPath, in UInt32 fontSize, in UInt32 maxCharacterCount, in UInt32 decimalCount, in Geometry geometry, in String attribute, in UInt32 rangeMinIndex, in SInt32 rangeMaxIndex, in UInt32 resolution, in Boolean computeGlobalPosition, in Xfo xfo, in Color color, out InlineInstance instance ) | |
drawAttributeAsVec3 ! ( in Geometry geometry, in String attribute, in Xfo xfo, in Color color, in Float32 scale, out InlineInstance instance ) | |
drawAxes ! ( in String name, in Xfo transform, out Vec3 dummyResult, out InlineInstance instance ) | |
drawAxesInstances ! ( in String name, in Xfo transforms[], out Vec3 dummyResult, out InlineInstance instance ) | |
drawColoredCurves ! ( in String name, in Xfo transform, in Curves curves, in Color specular, in Float32 specFactor, out InlineInstance instance ) | |
drawColoredCurvesInstances ! ( in String name, in Xfo transforms[], in Curves curves, in Color specular, in Float32 specFactor, out InlineInstance instance ) | |
drawColoredLines ! ( in String name, in Xfo transform, in Lines lines, out Vec3 dummyResult, out InlineInstance instance ) | |
drawColoredLinesInstances ! ( in Boolean accumulate, in String name, in Xfo transforms[], in Lines lines, out InlineInstance instance ) | |
drawColoredLinesInstances ! ( in String name, in Xfo transforms[], in Lines lines, out Vec3 dummyResult, out InlineInstance instance ) | |
drawColoredPolygonMesh ! ( in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out Vec3 dummyResult, out InlineInstance instance ) | |
drawColoredPolygonMeshInstances ! ( in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transforms[], in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out Vec3 dummyResult, out InlineInstance instance ) | |
drawCurves ! ( in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in Curves curves, out InlineInstance instance ) | |
drawCurvesInstances ! ( in Boolean accumulate, in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transforms[], in Curves curves, out InlineInstance instance ) | |
drawCurvesInstances ! ( in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transforms[], in Curves curves, out InlineInstance instance ) | |
drawLines ! ( in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in Lines lines, out Vec3 dummyResult, out InlineInstance instance ) | |
drawLinesArray ! ( in String name, in Color color, in Lines masters[], in Xfo transforms[], in Index indices[], out Vec3 dummyResult, out InlineInstance instance ) | |
drawLinesInstances ! ( in String name, in Color color, in Xfo transforms[], in Lines lines, out Vec3 dummyResult, out InlineInstance instance ) | |
drawPoints ! ( in String name, in Xfo transform, in Points points, out Vec3 dummyResult, out InlineInstance instance ) | |
drawPointsArray ! ( in String name, in Points masters[], in Xfo transforms[], in Index indices[], out Vec3 dummyResult, out InlineInstance instance ) | |
drawPointsInstances ! ( in String name, in Xfo transforms[], in Points points, out Vec3 dummyResult, out InlineInstance instance ) | |
drawPolygonMesh ! ( in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out Vec3 dummyResult, out InlineInstance instance ) | |
drawPolygonMeshArray ! ( in String name, in Color color, in Color specular, in Float32 specFactor, in PolygonMesh masters[], in Xfo transforms[], in Index indices[], in Boolean wireFrame, in Boolean doubleSided, out Vec3 dummyResult, out InlineInstance instance ) | |
drawPolygonMeshInstances ! ( in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transforms[], in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out Vec3 dummyResult, out InlineInstance instance ) | |
drawTexturedPlane ! ( in String name, in UInt32 width, in UInt32 height, in Color pixels[], in Boolean mirrorU, in Boolean mirrorV, in Boolean discardAlpha, in Xfo transform, out Vec3 dummyResult, out InlineInstance instance ) | |
drawTexturedPlane ! ( in String name, in UInt32 width, in UInt32 height, in Float32 pixels[], in Boolean mirrorU, in Boolean mirrorV, in Boolean discardAlpha, in Xfo transform, out Vec3 dummyResult, out InlineInstance instance ) | |
drawTexturedPolygonMesh ! ( in String name, in String filePath, in Color specular, in Float32 specFactor, in Color ambient, in Xfo transform, in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out Vec3 dummyResult, out InlineInstance instance ) | |
drawTexturedPolygonMeshInstances ! ( in String name, in String filePath, in Color specular, in Float32 specFactor, in Color ambient, in Xfo transforms[], in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out Vec3 dummyResult, out InlineInstance instance ) | |
InlineDebugShape | getDebugShape ! ( in String name ) |
InlineDebugShape | getDebugShape ! ( in String name, out Vec3 dummyResult ) |
InlineDrawing | getDrawing ? () |
InlineDebugShape | getEmptyDebugShape ! ( in String name ) |
InlineDebugShape | getEmptyDebugShape ! ( in String name, out Vec3 dummyResult ) |
InlineTransform | getRootTransform ? () |
Boolean | getVisibility ? () |
Boolean | isEmpty ? () |
removeDebugShape ! ( in String name ) | |
removeDebugShape ! ( in String name, out Vec3 dummyResult ) | |
setActive ! ( in Boolean active ) | |
setVisibility ! ( in Boolean visibility ) |
Methods in detail¶
DrawingHandle ( in DrawingHandle other )
copy constructor
DrawingHandle ( in String name )
constructor taking a name for the root transform of this drawing handle
default constructor
DrawingHandle.accumulateDraw2DText! ( in FilePath fontPath, in UInt32 fontSize, in String text, in Vec2 screenPosition, in Color textColor, out InlineInstance instance )
Helper function to draw a string in 2D screen space. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDraw2DTextArray! ( in FilePath fontPath, in UInt32 fontSize, in String text[], in Vec2 screenPositions[], in Color textColor[], out InlineInstance instance )
Helper function to draw an array of strings in 2D screen space. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDraw3DText! ( in FilePath fontPath, in UInt32 fontSize, in String text, in Vec3 worldPosition, in Color textColor, out InlineInstance instance )
Helper function to draw a string in 3D world space. This methods can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDraw3DTextArray! ( in FilePath fontPath, in UInt32 fontSize, in String text[], in Vec3 worldPositions[], in Color textColor[], out InlineInstance instance )
Helper function to draw an array of strings in 3D world space. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawColoredCurves! ( in Xfo transform, in Curves curves, in Color specular, in Float32 specFactor, out InlineInstance instance )
helper function to draw a curves object given a single transform. This method can be called several times by the same DrawingHandle without overwriting the previous content.
specFactor | If 0, a flat shader will be used. Otherwise, curve tangents will be used to derive a normal for the curve. |
DrawingHandle.accumulateDrawColoredCurvesInstances! ( in Xfo transforms[], in Curves curves, in Color specular, in Float32 specFactor, out InlineInstance instance )
helper function to draw a curves object given an array of transforms. This method can be called several times by the same DrawingHandle without overwriting the previous content.
specFactor | If 0, a flat shader will be used. Otherwise, curve tangents will be used to derive a normal for the curve. |
DrawingHandle.accumulateDrawColoredLines! ( in Xfo transform, in Lines lines, out InlineInstance instance )
helper function to draw a lines object given a single transform. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawColoredLinesInstances! ( in Xfo transforms[], in Lines lines, out InlineInstance instance )
helper function to draw a lines object given an array of transforms. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawColoredPolygonMesh! ( in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out InlineInstance instance )
helper function to draw a mesh given a color + a single transform. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawColoredPolygonMeshInstances! ( in Color color, in Color specular, in Float32 specFactor, in Xfo transforms[], in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out InlineInstance instance )
helper function to draw a mesh given a color + an array of transforms. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawCurves! ( in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in Curves curves, out InlineInstance instance )
helper function to draw a curves object given a color + a single transform. This method can be called several times by the same DrawingHandle without overwriting the previous content.
specFactor | If 0, a flat shader will be used. Otherwise, curve tangents will be used to derive a normal for the curve. |
DrawingHandle.accumulateDrawCurvesInstances! ( in Color color, in Color specular, in Float32 specFactor, in Xfo transforms[], in Curves curves, out InlineInstance instance )
helper function to draw a curves object given a color + an array of transforms. This method can be called several times by the same DrawingHandle without overwriting the previous content.
specFactor | If 0, a flat shader will be used. Otherwise, curve tangents will be used to derive a normal for the curve. |
DrawingHandle.accumulateDrawLines! ( in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in Lines lines, out InlineInstance instance )
helper function to draw a lines object given a color + a single transform. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawLinesArray! ( in Color color, in Lines masters[], in Xfo transforms[], in Index indices[], out InlineInstance instance )
Helper function for the InlineDrawing DrawingHandle data type to draw a list of objects given an index table and a list of transforms. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawLinesInstances! ( in Color color, in Xfo transforms[], in Lines lines, out InlineInstance instance )
helper function to draw a lines object given a color + an array of transforms. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawPoints! ( in Xfo transform, in Points points, out InlineInstance instance )
helper function to draw a points object given a color + a single transform. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawPointsArray! ( in Points masters[], in Xfo transforms[], in Index indices[], out InlineInstance instance )
Helper function for the InlineDrawing DrawingHandle data type to draw a list of objects given an index table and a list of transforms. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawPointsInstances! ( in Xfo transforms[], in Points points, out InlineInstance instance )
helper function to draw a points object given a color + an array of transforms. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawPolygonMesh! ( in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out InlineInstance instance )
helper function to draw a mesh given a color + a single transform. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawPolygonMeshArray! ( in Color color, in Color specular, in Float32 specFactor, in PolygonMesh masters[], in Xfo transforms[], in Index indices[], in Boolean wireFrame, in Boolean doubleSided, out InlineInstance instance )
Helper function for the InlineDrawing DrawingHandle data type to draw a list of objects given an index table and a list of transforms. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawPolygonMeshInstances! ( in Color color, in Color specular, in Float32 specFactor, in Xfo transforms[], in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out InlineInstance instance )
helper function to draw a mesh given a color + an array of transforms. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawTexturedPlane! ( in UInt32 width, in UInt32 height, in Color pixels[], in Boolean mirrorU, in Boolean mirrorV, in Boolean discardAlpha, in Xfo transform, out InlineInstance instance )
helper function to draw a plane given texture values + a single transform. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawTexturedPlane! ( in UInt32 width, in UInt32 height, in Float32 pixels[], in Boolean mirrorU, in Boolean mirrorV, in Boolean discardAlpha, in Xfo transform, out InlineInstance instance )
helper function to draw a plane given texture values + a single transform. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawTexturedPolygonMesh! ( in String filePath, in Color specular, in Float32 specFactor, in Color ambient, in Xfo transform, in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out InlineInstance instance )
helper function to draw a mesh given a color + a single transform. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.accumulateDrawTexturedPolygonMeshInstances! ( in String filePath, in Color specular, in Float32 specFactor, in Color ambient, in Xfo transforms[], in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out InlineInstance instance )
helper function to draw a mesh given a color + an array of transforms. This method can be called several times by the same DrawingHandle without overwriting the previous content.
DrawingHandle.clear! ()
removes all contents from the DrawingHandle
DrawingHandle DrawingHandle.clone? ()
clone method
DrawingHandle.draw2DText! ( in FilePath fontPath, in UInt32 fontSize, in String text, in Vec2 screenPosition, in Color textColor, out InlineInstance instance )
Helper function to draw a string in 2D screen space. If the same DrawingHandle invokes this method several times, only the last string will be displayed (it overwrites all the others).
DrawingHandle.draw2DTextArray! ( in FilePath fontPath, in UInt32 fontSize, in String text[], in Vec2 screenPositions[], in Color textColor[], out InlineInstance instance )
Helper function to draw an array of strings in 2D screen space. If the same DrawingHandle invokes this method several times, only the last string will be displayed (it overwrites all the others).
DrawingHandle.draw3DText! ( in FilePath fontPath, in UInt32 fontSize, in String text, in Vec3 worldPosition, in Color textColor, out InlineInstance instance )
Helper function to draw a string in 3D world space. If the same DrawingHandle invokes this method several times, only the last string will be displayed (it overwrites all the others).
DrawingHandle.draw3DTextArray! ( in FilePath fontPath, in UInt32 fontSize, in String text[], in Vec3 worldPositions[], in Color textColor[], out InlineInstance instance )
Helper function to draw an array of strings in 3D world space. If the same DrawingHandle invokes this method several times, only the last string will be displayed (it overwrites all the others).
DrawingHandle.drawAttributeAsAxes! ( in Geometry geometry, in String attribute, in Xfo xfo, in Float32 scale, in Boolean local, out InlineInstance instance )
helper function to draw a surface Vec3 attribute
DrawingHandle.drawAttributeAsColor! ( in Geometry geometry, in String attribute, in Xfo xfo, in Float32 radius, out InlineInstance instance )
helper function to draw a surface Vec3 attribute
DrawingHandle.drawAttributeAsFloat32! ( in Geometry geometry, in String attribute, in Xfo xfo, in Float32 minValue, in Float32 maxValue, in Float32 minRadius, in Float32 maxRadius, in Color minColor, in Color maxColor, out InlineInstance instance )
helper function to draw a surface Vec3 attribute
DrawingHandle.drawAttributeAsPosition! ( in Geometry geometry, in String attribute, in Xfo xfo, in Color color, in Float32 radius, out InlineInstance instance )
helper function to draw a surface Vec3 attribute
DrawingHandle.drawAttributeAsText! ( in FilePath fontPath, in UInt32 fontSize, in UInt32 maxCharacterCount, in UInt32 decimalCount, in Geometry geometry, in String attribute, in UInt32 rangeMinIndex, in SInt32 rangeMaxIndex, in UInt32 resolution, in Boolean computeGlobalPosition, in Xfo xfo, in Color color, out InlineInstance instance )
Helper function to draw geometry attributes as text.
DrawingHandle.drawAttributeAsVec3! ( in Geometry geometry, in String attribute, in Xfo xfo, in Color color, in Float32 scale, out InlineInstance instance )
helper function to draw a surface Vec3 attribute
DrawingHandle.drawAxes! ( in String name, in Xfo transform, out Vec3 dummyResult, out InlineInstance instance )
helper function to draw a single axes
DrawingHandle.drawAxesInstances! ( in String name, in Xfo transforms[], out Vec3 dummyResult, out InlineInstance instance )
helper function to draw axes at given transforms
DrawingHandle.drawColoredCurves! ( in String name, in Xfo transform, in Curves curves, in Color specular, in Float32 specFactor, out InlineInstance instance )
helper function to draw a curves object given a single transform
specFactor | If 0, a flat shader will be used. Otherwise, curve tangents will be used to derive a normal for the curve. |
DrawingHandle.drawColoredCurvesInstances! ( in String name, in Xfo transforms[], in Curves curves, in Color specular, in Float32 specFactor, out InlineInstance instance )
helper function to draw a curves object given an array of transforms.
specFactor | If 0, a flat shader will be used. Otherwise, curve tangents will be used to derive a normal for the curve. |
DrawingHandle.drawColoredLines! ( in String name, in Xfo transform, in Lines lines, out Vec3 dummyResult, out InlineInstance instance )
helper function to draw a lines object given a single transform
DrawingHandle.drawColoredLinesInstances! ( in Boolean accumulate, in String name, in Xfo transforms[], in Lines lines, out InlineInstance instance )
helper function to draw a lines object given an array of transforms
DrawingHandle.drawColoredLinesInstances! ( in String name, in Xfo transforms[], in Lines lines, out Vec3 dummyResult, out InlineInstance instance )
helper function to draw a lines object given an array of transforms
DrawingHandle.drawColoredPolygonMesh! ( in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out Vec3 dummyResult, out InlineInstance instance )
helper function to draw a mesh given a color + a single transform
DrawingHandle.drawColoredPolygonMeshInstances! ( in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transforms[], in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out Vec3 dummyResult, out InlineInstance instance )
helper function to draw a mesh given a color + an array of transforms
DrawingHandle.drawCurves! ( in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in Curves curves, out InlineInstance instance )
helper function to draw a curves object given a color + a single transform
specFactor | If 0, a flat shader will be used. Otherwise, curve tangents will be used to derive a normal for the curve. |
DrawingHandle.drawCurvesInstances! ( in Boolean accumulate, in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transforms[], in Curves curves, out InlineInstance instance )
DrawingHandle.drawCurvesInstances! ( in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transforms[], in Curves curves, out InlineInstance instance )
helper function to draw a curves object given a color + an array of transforms
specFactor | If 0, a flat shader will be used. Otherwise, curve tangents will be used to derive a normal for the curve. |
DrawingHandle.drawLines! ( in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in Lines lines, out Vec3 dummyResult, out InlineInstance instance )
helper function to draw a lines object given a color + a single transform
DrawingHandle.drawLinesArray! ( in String name, in Color color, in Lines masters[], in Xfo transforms[], in Index indices[], out Vec3 dummyResult, out InlineInstance instance )
Helper function for the InlineDrawing DrawingHandle data type to draw a list of objects given an index table and a list of transforms.
DrawingHandle.drawLinesInstances! ( in String name, in Color color, in Xfo transforms[], in Lines lines, out Vec3 dummyResult, out InlineInstance instance )
helper function to draw a lines object given a color + an array of transforms
DrawingHandle.drawPoints! ( in String name, in Xfo transform, in Points points, out Vec3 dummyResult, out InlineInstance instance )
helper function to draw a points object given a color + a single transform
DrawingHandle.drawPointsArray! ( in String name, in Points masters[], in Xfo transforms[], in Index indices[], out Vec3 dummyResult, out InlineInstance instance )
Helper function for the InlineDrawing DrawingHandle data type to draw a list of objects given an index table and a list of transforms.
DrawingHandle.drawPointsInstances! ( in String name, in Xfo transforms[], in Points points, out Vec3 dummyResult, out InlineInstance instance )
helper function to draw a points object given a color + an array of transforms
DrawingHandle.drawPolygonMesh! ( in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transform, in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out Vec3 dummyResult, out InlineInstance instance )
helper function to draw a mesh given a color + a single transform
DrawingHandle.drawPolygonMeshArray! ( in String name, in Color color, in Color specular, in Float32 specFactor, in PolygonMesh masters[], in Xfo transforms[], in Index indices[], in Boolean wireFrame, in Boolean doubleSided, out Vec3 dummyResult, out InlineInstance instance )
Helper function for the InlineDrawing DrawingHandle data type to draw a list of objects given an index table and a list of transforms.
DrawingHandle.drawPolygonMeshInstances! ( in String name, in Color color, in Color specular, in Float32 specFactor, in Xfo transforms[], in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out Vec3 dummyResult, out InlineInstance instance )
helper function to draw a mesh given a color + an array of transforms
DrawingHandle.drawTexturedPlane! ( in String name, in UInt32 width, in UInt32 height, in Color pixels[], in Boolean mirrorU, in Boolean mirrorV, in Boolean discardAlpha, in Xfo transform, out Vec3 dummyResult, out InlineInstance instance )
helper function to draw a plane given texture values + a single transform
DrawingHandle.drawTexturedPlane! ( in String name, in UInt32 width, in UInt32 height, in Float32 pixels[], in Boolean mirrorU, in Boolean mirrorV, in Boolean discardAlpha, in Xfo transform, out Vec3 dummyResult, out InlineInstance instance )
helper function to draw a plane given texture values + a single transform.
DrawingHandle.drawTexturedPolygonMesh! ( in String name, in String filePath, in Color specular, in Float32 specFactor, in Color ambient, in Xfo transform, in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out Vec3 dummyResult, out InlineInstance instance )
helper function to draw a mesh given a color + a single transform
DrawingHandle.drawTexturedPolygonMeshInstances! ( in String name, in String filePath, in Color specular, in Float32 specFactor, in Color ambient, in Xfo transforms[], in PolygonMesh mesh, in Boolean wireFrame, in Boolean doubleSided, out Vec3 dummyResult, out InlineInstance instance )
helper function to draw a mesh given a color + an array of transforms
InlineDebugShape DrawingHandle.getDebugShape! ( in String name )
helper function to get a debug shape
InlineDebugShape DrawingHandle.getDebugShape! ( in String name, out Vec3 dummyResult )
helper function to get a debug shape
InlineDrawing DrawingHandle.getDrawing? ()
returns the handle’s InlineDrawing
InlineDebugShape DrawingHandle.getEmptyDebugShape! ( in String name )
helper function to clear a debug drawing shape
InlineDebugShape DrawingHandle.getEmptyDebugShape! ( in String name, out Vec3 dummyResult )
helper function to clear a debug drawing shape
InlineTransform DrawingHandle.getRootTransform? ()
returns the root transform of this drawing. use this to add content.
Boolean DrawingHandle.getVisibility? ()
gets the visibility state of this handle
Boolean DrawingHandle.isEmpty? ()
returns true if this handle has no content
DrawingHandle.removeDebugShape! ( in String name )
helper function to remove a debug drawing shape
DrawingHandle.removeDebugShape! ( in String name, out Vec3 dummyResult )
helper function to remove a debug drawing shape
DrawingHandle.setActive! ( in Boolean active )
enables or disables the rendering of this handle
注釈
Can be removed, it has been implemented in setVisibility (FE-7305)
DrawingHandle.setVisibility! ( in Boolean visibility )
sets the visibility state of this handle