Skip to content

Actor2D

Introduction

vtkActor2D is used to represent a 2D entity in a rendering scene. It inherits functions related to the actors position, and orientation from vtkProp. The actor also has scaling and maintains a reference to the defining geometry (i.e., the mapper), rendering properties, and possibly a texture map.

See Also

vtkMapper2DvtkProperty2D

Methods

extend

Method use to decorate a given object (publicAPI+model) with vtkActor2D characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIActor2DInitialValuesNo(default: {})

getActors2D

getActualPositionCoordinate

Return the actual vtkCoordinate reference that the mapper should use to position the actor. This is used internally by the mappers and should be overridden in specialized subclasses and otherwise ignored.

getActualPositionCoordinate2

getBounds

Get the bounds as [xmin, xmax, ymin, ymax, zmin, zmax].

getHeight

getIsOpaque

getLayerNumber

Get the layer number for this 2D actor. The scenegraph uses this layer number to sort actor 2D overlays/underlays on top of each other. The actor2D with the highest layer number is going to be rendered at the very front i.e. it is the top-most layer. If two actor2D instances share the same layer number, they are rendered in the order in which they were added to the renderer via addActor or addActor2D. By default, each actor2D has a layer number of 0.

getMapper

Gets the 2D mapper.

getProperty

Return the property object that controls this actors surface properties. This should be an instance of a vtkProperty2D object. Every actor must have a property associated with it. If one isn’t specified, then one will be generated automatically. Multiple actors can share one property object.

getWidth

hasTranslucentPolygonalGeometry

makeProperty

Create a new property suitable for use with this type of Actor.

ArgumentTypeRequiredDescription
initialValuesIProperty2DInitialValuesNo(default: {})

newInstance

Method use to create a new instance of vtkActor2D

ArgumentTypeRequiredDescription
initialValuesIActor2DInitialValuesNofor pre-setting some of its content

setDisplayPosition

Set the Prop2D's position in display coordinates.

ArgumentTypeRequiredDescription
XPosYes
YPosYes

setHeight

ArgumentTypeRequiredDescription
wYes

setLayerNumber

Set the layer number for this 2D actor. The scenegraph uses this layer number to sort actor 2D overlays/underlays on top of each other. The actor2D with the highest layer number is going to be rendered at the very front i.e. it is the top-most layer. If two actor2D instances share the same layer number, they are rendered in the order in which they were added to the renderer via addActor or addActor2D. By default, each actor2D has a layer number of 0.

setMapper

Sets the 2D mapper.

setWidth

ArgumentTypeRequiredDescription
wYes