public class SoImage extends SoShape
SoImage
node allows you to display an image without using the texture facilities. The image is a 2D image attached to a 3D justification point. The justification point is at (0,0,0) after applying the current transformation. The image is always parallel to the screen. The image is
not resized when the render window is resized.
The image can be read from the file specified by the filename
field. Once the image has been read, the image
field contains the image data. However, this field is marked so the image is not written out when the image node is written to a file. To turn off the image, set the filename
field to an empty string ("").
Images can also be specified in memory by setting the image
field to contain the image data. Doing so resets the file name to the empty string.
This node can be useful for placing a logo in the scene, or for attaching an icon or marker to a 3D point.
By default (or when the width and height fields are both set to negative values), the actual size of the image is used. If the width and/or height are specified, the image is scaled to the specified size in pixels.
Note that SoImage
automatically enables OpenGL blending for 2 or 4 component images, but it does not set the blending function. However, if you have enabled non-screendoor transparency, or if any of the textures in your scene graph have 2 or 4 components, the blending function
will be set.
Note that the position of the image on the screen depends on the current camera settings, so generally this node should not be render cached. SoImage
nodes prohibit auto-caching, so that no SoSeparator
(or other render caching node) above an SoImage
in the scene graph will automatically create a render cache. This can significantly affect performance and applications should try to keep nodes that
can be render cached (especially geometry nodes) under a different SoSeparator
.
Shape Antialiasing type is SoShape.POINTS
.
Note: SoImage
does not cast or receive shadows (see SoShadowGroup
).
File format/default:
Image {
filename | " " |
image | 0 0 0 |
horAlignment | LEFT |
vertAlignment | BOTTOM |
width | -1 |
height | -1 |
Action behavior:
SoGLRenderAction
Draws the image parallel to the screen.
SoRayPickAction
Picks the image based on the current transformation and view.
SoGetPrimitiveCountAction
Increments the number of images by 1.
See also:
Modifier and Type | Class and Description |
---|---|
static class |
SoImage.FileTypes
File type.
|
static class |
SoImage.HorAlignments
Horizontal alignment.
|
static class |
SoImage.VertAlignments
Vertical alignment.
|
SoShape.ShapeTypes
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
static int |
BMP
Deprecated.
Use
SoImage.FileTypes.BMP instead. |
static int |
BOTTOM
Deprecated.
Use
SoImage.VertAlignments.BOTTOM instead. |
static int |
CENTER
Deprecated.
Use
SoImage.HorAlignments.CENTER instead. |
static int |
DDS
Deprecated.
Use
SoImage.FileTypes.DDS instead. |
SoSFFilePathString |
filename
Names file from which to read image.
|
static int |
GIF
Deprecated.
Use
SoImage.FileTypes.GIF instead. |
static int |
HALF
Deprecated.
Use
SoImage.VertAlignments.HALF instead. |
static int |
HDRI
Deprecated.
Use
SoImage.FileTypes.HDRI instead. |
SoSFInt32 |
height
Height of image in pixels (optional).
|
SoSFEnum<SoImage.HorAlignments> |
horAlignment
Horizontal alignment.
|
SoSFImage |
image
Contains an in-memory representation of the image.
|
static int |
JPEG
Deprecated.
Use
SoImage.FileTypes.JPEG instead. |
static int |
JPEG2000
Deprecated.
Use
SoImage.FileTypes.JPEG2000 instead. |
static int |
LEFT
Deprecated.
Use
SoImage.HorAlignments.LEFT instead. |
static int |
NUM_FILETYPES
Deprecated.
Use
SoImage.FileTypes.NUM_FILETYPES instead. |
static int |
PGX
Deprecated.
Use
SoImage.FileTypes.PGX instead. |
static int |
PNG
Deprecated.
Use
SoImage.FileTypes.PNG instead. |
static int |
PNM
Deprecated.
Use
SoImage.FileTypes.PNM instead. |
static int |
RAS
Deprecated.
Use
SoImage.FileTypes.RAS instead. |
static int |
RGB
Deprecated.
Use
SoImage.FileTypes.RGB instead. |
static int |
RIGHT
Deprecated.
Use
SoImage.HorAlignments.RIGHT instead. |
static int |
SGI
Deprecated.
Use
SoImage.FileTypes.SGI instead. |
static int |
TIFF
Deprecated.
Use
SoImage.FileTypes.TIFF instead. |
static int |
TOP
Deprecated.
Use
SoImage.VertAlignments.TOP instead. |
static int |
UNKNOWN
Deprecated.
Use
SoImage.FileTypes.UNKNOWN instead. |
SoSFEnum<SoImage.VertAlignments> |
vertAlignment
Vertical alignment.
|
SoSFInt32 |
width
Width of image in pixels (optional).
|
boundingBoxIgnoring, LINES, POINTS, POLYGONS, TEXT
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoImage()
Constructor.
|
getShapeType, isPrimitiveRestartAvailable, isPrimitiveRestartAvailable
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
@Deprecated public static final int LEFT
SoImage.HorAlignments.LEFT
instead.@Deprecated public static final int CENTER
SoImage.HorAlignments.CENTER
instead.@Deprecated public static final int RIGHT
SoImage.HorAlignments.RIGHT
instead.@Deprecated public static final int BOTTOM
SoImage.VertAlignments.BOTTOM
instead.@Deprecated public static final int HALF
SoImage.VertAlignments.HALF
instead.@Deprecated public static final int TOP
SoImage.VertAlignments.TOP
instead.@Deprecated public static final int UNKNOWN
SoImage.FileTypes.UNKNOWN
instead.@Deprecated public static final int RGB
SoImage.FileTypes.RGB
instead.@Deprecated public static final int SGI
SoImage.FileTypes.SGI
instead.@Deprecated public static final int TIFF
SoImage.FileTypes.TIFF
instead.@Deprecated public static final int GIF
SoImage.FileTypes.GIF
instead.@Deprecated public static final int JPEG
SoImage.FileTypes.JPEG
instead.@Deprecated public static final int BMP
SoImage.FileTypes.BMP
instead.@Deprecated public static final int PNG
SoImage.FileTypes.PNG
instead.@Deprecated public static final int JPEG2000
SoImage.FileTypes.JPEG2000
instead.@Deprecated public static final int PGX
SoImage.FileTypes.PGX
instead.@Deprecated public static final int PNM
SoImage.FileTypes.PNM
instead.@Deprecated public static final int RAS
SoImage.FileTypes.RAS
instead.@Deprecated public static final int DDS
SoImage.FileTypes.DDS
instead.@Deprecated public static final int HDRI
SoImage.FileTypes.HDRI
instead.@Deprecated public static final int NUM_FILETYPES
SoImage.FileTypes.NUM_FILETYPES
instead.public final SoSFFilePathString filename
SoRasterImageRW
for the list. If the filename is not an absolute path name, the list of directories maintained by SoInput
is searched. If the texture is not found in any of those directories, then the file is searched for relative to the directory from which the SoImage
node was read. For example, if an SoImage
node with a filename of "../tofu.rgb" is read from /usr/people/bob/models/food.iv, then /usr/people/bob/tofu.rgb will be read (assuming tofu.rgb isn't found in the directories maintained by SoInput
).public final SoSFImage image
SoSFImage
.public final SoSFEnum<SoImage.HorAlignments> horAlignment
public final SoSFEnum<SoImage.VertAlignments> vertAlignment
public final SoSFInt32 width
public final SoSFInt32 height
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com