SoTexture3 Class |
3D texture mapping node.
Namespace: OIV.Inventor.Nodes
The SoTexture3 type exposes the following members.
Name | Description | |
---|---|---|
SoTexture3 | Creates a texture node with default settings. |
Name | Description | |
---|---|---|
AffectsState | Returns true if a node has an effect on the state during traversal. | |
Callback | (Inherited from SoTexture.) | |
Copy | Calls Copy(false). (Inherited from SoNode.) | |
Copy(Boolean) | Creates and returns an exact copy of the node. | |
CopyFieldValues(SoFieldContainer) | Calls CopyFieldValues(fc, false). (Inherited from SoFieldContainer.) | |
CopyFieldValues(SoFieldContainer, Boolean) | Copies the contents of fc's fields into this object's fields. | |
Dispose |
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.) | |
Distribute | (Inherited from SoNode.) | |
DoAction | (Overrides SoTextureDoAction(SoAction).) | |
EnableNotify | Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false). | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
FieldsAreEqual | Returns true if this object's fields are exactly equal to fc's fields. | |
Get | Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string. | |
GetAllFields | Returns a list of fields, including the eventIn's and eventOut's. | |
GetAlternateRep | This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type). | |
GetBitmapFileType | Gets the texture file format. | |
GetBoundingBox | (Inherited from SoNode.) | |
GetEventIn | Returns a the eventIn with the given name. | |
GetEventOut | Returns the eventOut with the given name. | |
GetField | Returns a the field of this object whose name is fieldName. | |
GetFieldName | Returns the name of the given field in the fieldName argument. | |
GetFields | Appends references to all of this object's fields to resultList, and returns the number of fields appended. | |
GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) | |
GetMatrix | (Inherited from SoNode.) | |
GetName | Returns the name of an instance. | |
GetPrimitiveCount | (Inherited from SoNode.) | |
GetRenderEngineMode | Returns the supported Render engine mode. | |
GetRenderUnitID | (Inherited from SoNode.) | |
GetStringName | (Inherited from SoBase.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GLRender | (Overrides SoTextureGLRender(SoGLRenderAction).) | |
GLRenderBelowPath | (Inherited from SoNode.) | |
GLRenderInPath | (Inherited from SoNode.) | |
GLRenderOffPath | (Inherited from SoNode.) | |
GrabEventsCleanup | (Inherited from SoNode.) | |
GrabEventsSetup | (Inherited from SoNode.) | |
HandleEvent | (Inherited from SoNode.) | |
HasDefaultValues | Returns true if all of the object's fields have their default values. | |
IsBoundingBoxIgnoring | This method is used by getBoundingBox action traversal to know if the current node must be traversed or not, ie the bounding should be ignored. | |
IsNotifyEnabled | Notification is the process of telling interested objects that this object has changed. | |
IsOverride | Returns the state of the override field. | |
IsSynchronizable | Gets the ScaleViz synchronizable state of this object. | |
Pick | (Inherited from SoNode.) | |
RayPick | (Inherited from SoNode.) | |
Search | (Inherited from SoNode.) | |
Set | Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format. | |
SetBitmapFileType | Sets the texture file format. | |
SetName | (Inherited from SoBase.) | |
SetOverride | Set the state of the override field. | |
SetSynchronizable | Sets this to be a ScaleViz synchronizable object. | |
SetToDefaults | Sets all fields in this object to their default values. | |
ToString |
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.) | |
Touch | Marks an instance as modified, simulating a change to it. | |
Write | (Inherited from SoNode.) |
Name | Description | |
---|---|---|
blendColor | Color used for BLEND model. | |
borderColor | Defines border color used for border texture filtering. | |
enableBorder | Enables borders for textures. | |
enableCompressedTexture | Enables storage of textures on the graphics board in compressed form. | |
filenames | Names of file(s) from which to read texture image(s). | |
images | Contains an in-memory representation of the texture map. | |
internalFormat | Internal format for texture storage. | |
IsDisposable | ISafeDisposable interface implementation.
(Inherited from SoDisposable.) | |
layout | Indicates whether the data layout is a volumetric texture VOLUME or an array of bi-dimensional textures ARRAY. | |
magFilter | Specifies the OpenGL magFilter. | |
maxAnisotropy | Specifies on a per-texture object basis, the maximum degree of anisotropy to account for in texture filtering. | |
minFilter | Specifies the OpenGL minFilter. | |
model | Specifies how to map texture onto surface. | |
UserData |
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.) | |
wrapR | Indicates what to do when texture coordinates in the R (depth) direction lie outside the range 0-1. | |
wrapS | Indicates what to do when texture coordinates in the S (horizontal) direction lie outside the range 0-1. | |
wrapT | Indicates what to do when texture coordinates in the T (vertical) direction lie outside the range 0-1. |
This property node defines a 3D texture map and parameters for that map. This map is used to apply a 3D texture to subsequent shapes as they are rendered.
The texture can be read from the file(s) specified by the OIV.Inventor.Nodes.SoTexture3.filenames field. Once the texture has been read, the OIV.Inventor.Nodes.SoTexture3.images field contains the texture data. However, this field is marked so the image is not written out when the texture node is written to a file. To turn off texturing, set the first value of the OIV.Inventor.Nodes.SoTexture3.filenames field to an empty string ("").
Textures can also be specified in memory by setting the OIV.Inventor.Nodes.SoTexture3.images field to contain the texture data. Doing so resets the OIV.Inventor.Nodes.SoTexture3.filenames field to the empty string.
Simply put, a 3D texture is a set of well-arranged 2D textures. Typically, 3D textures represent a set of image-slices of a given volume of data, and are used for mapping onto pieces of geometry. Note that this is different from direct volume rendering in that 3D textures need to be mapped onto a piece of geometry.
OpenGL requires all images in a 3D texture to have the same dimensions, and each dimension (X, Y, and Z) needs to be a power of 2. Also, images must have the same number of components (grayscale, grayscale with transparency, RGB, or RGB with transparency).
Images that do not have the same number of components as the first image are recomputed to have the same number of components. At best, there is no loss of quality. At worst, the recomputed images may lose colors and/or transparency.
If the 2D texture image's width or height is greater than the maximum supported by OpenGL, then the image will be clipped at the maximum texture size.
If one or more of the dimensions is not a power of 2, the texture is enlarged (it is never shrunk) to fit the power-of-2 requirement. Note that, unlike 2D textures where a resized texture is actually rescaled, the 3D image is not rescaled. Instead, black pixels are added to the edge of the image.
You should take this into account when setting texture coordinates. If your 3D image is not correctly dimensioned, you may want to consider either applying a ratio to your coordinates or adding an OIV.Inventor.Nodes.SoTexture3Transform node with the field scaleFactor set to compensate.
Images that have a different size from the first image are resized (clipped or augmented) to match the size of the first image (which itself may have been resized to satisfy the size requirements of OpenGL).
If the number of images (the depth of the 3D texture) is not a power of 2, an error is issued and the nearest power of 2 is chosen. If it is lower, some images are discarded; if it is higher, new images are created and filled with zeros.
The quality of the texturing is affected by the textureQuality field of the OIV.Inventor.Nodes.SoComplexity node. The textureQuality field affects what kind of filtering is done to the texture when it must be minified or magnified. The mapping of a particular texture quality value to a particular OpenGL filtering technique is implementation dependent, and varies based on the texturing performance. If mipmap filtering is required, mipmaps are automatically created using the simple box filter.
Transparency Texture images can contain transparency (alpha values less than 1) and modify the transparency of geometry in the scene. Also note that some image file formats, for example JPEG, do not support transparency information (alpha channel).
LIMITATIONS
3D textures are only supported by the following shapes:
Only OIV.Inventor.Nodes.SoIndexedFaceSet shapes automatically compute texture coordinates if they are not specified either by a texture coordinate function (see OIV.Inventor.Nodes.SoTextureCoordinateFunction) or by explicit texture coordinates (see OIV.Inventor.Nodes.SoTextureCoordinate3).
Texture3 {
filenames | "" |
enableCompressedTexture | false |
images | 0 0 0 0 |
wrapS | REPEAT |
wrapT | REPEAT |
wrapR | REPEAT |
model | MODULATE |
blendColor | 0 0 0 |
enableBorder | false |
borderColor | 0 0 0 1 |
maxAnisotropy | 1.0 |
minFilter | AUTO |
magFilter | AUTO |
useAutoMipmap | false |
internalFormat | AUTO_INTERNAL_FORMAT |
layout | VOLUME |
OIV.Inventor.Actions.SoGLRenderAction, OIV.Inventor.Actions.SoCallbackAction Sets current texture in state. Sets: OIV.Inventor.Elements.SoTextureImage3Element