Click or drag to resize
SoTextureCubeMap Class

Cube texture mapping node.

Inheritance Hierarchy

Namespace: OIV.Inventor.Nodes
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.1.1.0 (2024.1.1)
Syntax
public class SoTextureCubeMap : SoTexture

The SoTextureCubeMap type exposes the following members.

Constructors
  NameDescription
Public methodSoTextureCubeMap

Creates a texture node with default settings.

Top
Methods
  NameDescription
Public methodAffectsState

Returns true if a node has an effect on the state during traversal.

(Inherited from SoNode.)
Public methodAllowPrequalifyFile
Public methodCallback
(Inherited from SoTexture.)
Public methodCopy
Calls Copy(false).
(Inherited from SoNode.)
Public methodCopy(Boolean)

Creates and returns an exact copy of the node.

(Inherited from SoNode.)
Public methodCopyFieldValues(SoFieldContainer)
Calls CopyFieldValues(fc, false).
(Inherited from SoFieldContainer.)
Public methodCopyFieldValues(SoFieldContainer, Boolean)

Copies the contents of fc's fields into this object's fields.

(Inherited from SoFieldContainer.)
Public methodDispose
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.)
Public methodDistribute
(Inherited from SoNode.)
Public methodDoAction
Public methodEnableNotify

Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false).

(Inherited from SoFieldContainer.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodFieldsAreEqual

Returns true if this object's fields are exactly equal to fc's fields.

(Inherited from SoFieldContainer.)
Public methodGet

Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.

(Inherited from SoFieldContainer.)
Public methodGetAllFields

Returns a list of fields, including the eventIn's and eventOut's.

(Inherited from SoFieldContainer.)
Public methodGetAlternateRep

This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type).

(Inherited from SoNode.)
Public methodGetBitmapFileType

Gets the texture file format.

(Inherited from SoTexture.)
Public methodGetBoundingBox
(Inherited from SoNode.)
Public methodGetEventIn

Returns a the eventIn with the given name.

(Inherited from SoFieldContainer.)
Public methodGetEventOut

Returns the eventOut with the given name.

(Inherited from SoFieldContainer.)
Public methodGetField

Returns a the field of this object whose name is fieldName.

(Inherited from SoFieldContainer.)
Public methodGetFieldName

Returns the name of the given field in the fieldName argument.

(Inherited from SoFieldContainer.)
Public methodGetFields

Appends references to all of this object's fields to resultList, and returns the number of fields appended.

(Inherited from SoFieldContainer.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetMatrix
(Inherited from SoNode.)
Public methodGetName

Returns the name of an instance.

(Inherited from SoBase.)
Public methodGetPrimitiveCount
(Inherited from SoNode.)
Public methodGetRenderEngineMode

Returns the supported Render engine mode.

(Inherited from SoNode.)
Public methodGetRenderUnitID
(Inherited from SoNode.)
Public methodGetStringName (Inherited from SoBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGLRender
Public methodGLRenderBelowPath
(Inherited from SoNode.)
Public methodGLRenderInPath
(Inherited from SoNode.)
Public methodGLRenderOffPath
(Inherited from SoNode.)
Public methodGrabEventsCleanup
(Inherited from SoNode.)
Public methodGrabEventsSetup
(Inherited from SoNode.)
Public methodHandleEvent
(Inherited from SoNode.)
Public methodHasDefaultValues

Returns true if all of the object's fields have their default values.

(Inherited from SoFieldContainer.)
Public methodIsAllowPrequalifyFile
Public methodIsBoundingBoxIgnoring

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.

(Inherited from SoNode.)
Public methodIsNotifyEnabled

Notification is the process of telling interested objects that this object has changed.

(Inherited from SoFieldContainer.)
Public methodIsOverride

Returns the state of the override field.

(Inherited from SoTexture.)
Public methodIsSynchronizable

Gets the ScaleViz synchronizable state of this object.

(Inherited from SoBase.)
Public methodPick
(Inherited from SoNode.)
Public methodRayPick
(Inherited from SoNode.)
Public methodSearch
(Inherited from SoNode.)
Public methodSet

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.

(Inherited from SoFieldContainer.)
Public methodSetBitmapFileType

Sets the texture file format.

(Inherited from SoTexture.)
Public methodSetName (Inherited from SoBase.)
Public methodSetOverride

Set the state of the override field.

(Inherited from SoTexture.)
Public methodSetSynchronizable

Sets this to be a ScaleViz synchronizable object.

(Inherited from SoBase.)
Public methodSetToDefaults

Sets all fields in this object to their default values.

(Inherited from SoFieldContainer.)
Public methodToString
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.)
Public methodTouch

Marks an instance as modified, simulating a change to it.

(Inherited from SoNode.)
Public methodWrite
(Inherited from SoNode.)
Top
Properties
  NameDescription
Public propertyblendColor

Color used for BLEND model.

(Inherited from SoTexture.)
Public propertyborderColor

Defines border color used for border texture filtering.

(Inherited from SoTexture.)
Public propertyenableBorder

Enables borders for textures.

(Inherited from SoTexture.)
Public propertyenableCompressedTexture

Enables storage of textures on the graphics board in compressed form.

(Inherited from SoTexture.)
Public propertyfilenames

Names file(s) from which to read texture image(s).

Public propertyHDRIExposure

Specifies an exposure factor when using an HDRI file.

Public propertyimageNegX
Public propertyimageNegY
Public propertyimageNegZ
Public propertyimagePosX

Contains an in-memory representation of the texture map.

Public propertyimagePosY
Public propertyimagePosZ
Public propertyinternalFormat

Internal format for texture storage.

(Inherited from SoTexture.)
Public propertyIsDisposable
ISafeDisposable interface implementation.
(Inherited from SoDisposable.)
Public propertymagFilter

Specifies the OpenGL magFilter.

(Inherited from SoTexture.)
Public propertymaxAnisotropy

Specifies on a per-texture object basis, the maximum degree of anisotropy to account for in texture filtering.

(Inherited from SoTexture.)
Public propertyminFilter

Specifies the OpenGL minFilter.

(Inherited from SoTexture.)
Public propertymodel

Specifies how to map texture onto surface.

(Inherited from SoTexture.)
Public propertyrenderToTextureProperty

Specifies an OIV.Inventor.Nodes.SoRenderToTextureProperty node containing a scene graph that will be rendered to create the texture image.

Public propertyUserData
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.)
Public propertywrapR

Indicates what to do when texture coordinates in the R (depth) direction lie outside the range 0-1.

Public propertywrapS

Indicates what to do when texture coordinates in the S (horizontal) direction lie outside the range 0-1.

(Inherited from SoTexture.)
Public propertywrapT

Indicates what to do when texture coordinates in the T (vertical) direction lie outside the range 0-1.

Top
Remarks

Cube map textures provide a new texture generation scheme for looking up textures from a set of six two-dimensional images representing the faces of a cube. The (s,t,r) texture coordinates are treated as a direction vector emanating from the center of a cube. At texture generation time, the interpolated per-fragment (s,t,r) selects one cube face two-dimensional image based on the largest magnitude coordinate (the major axis). A new (s,t) is calculated by dividing the two other coordinates (the minor axes values) by the major axis value, and the new (s,t) is used to lookup into the selected two-dimensional texture image face of the cube map.

Cube map textures are often used within shader programs to implement effects such as reflection or refraction.

There are three ways to send the texture to Open Inventor:

But in all cases, the images must be specified in the following order:

  • imagePosX (left)

  • imagePosY (bottom)

  • imagePosZ (back)

  • imageNegX (right)

  • imageNegY (top)

  • imageNegZ (front)

The OIV.Inventor.Nodes.SoTextureCoordinateReflectionMap node can be used to automatically generate appropriate texture coordinates for cube mapping.

If the texture image's width or height is not a power of 2, and the Non Power Of Two (NPOT) extension is available on your graphics board, by default Open Inventor will send the image to OpenGL without modification. See OIV.Inventor.Nodes.SoTexture2 for a complete discussion of this feature.

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:

  • Since Open Inventor 10.0.0 Alpha 2 it is no longer possible to fill a OIV.Inventor.Nodes.SoTextureCubeMap with textures in different formats or sizes. All six textures must have the same format and size. If these conditions are not met, an error message is displayed (in debug) and nothing is changed on the state.

EXAMPLE

SoInput.AddDirectoryFirst("/ImageDirectory");
string[] faceFile = { 
 "left.jpg",
 "bottom.jpg",
 "back.jpg",
 "right.jpg",
 "top.jpg",
 "front.jpg",
};
SoTextureCubeMap texture = new SoTextureCubeMap();
for (int i = 0; i < 6; ++i)
{
   texture.filenames[i] = faceFile[i];
}
root.AddChild( new SoTextureCoordinateReflectionMap() );
root.AddChild( texture );
root.AddChild( geometry );

FILE FORMAT/DEFAULT

TextureCubeMap {
filenames ""
imagePosX 0 0 0
imageNegX 0 0 0
imagePosY 0 0 0
imageNegY 0 0 0
imagePosZ 0 0 0
imageNegZ 0 0 0
wrapS REPEAT
wrapT REPEAT
wrapR REPEAT
enableCompressedTexture false
model MODULATE
blendColor 0 0 0
enableBorder false
borderColor 0 0 0 0
maxAnisotropy 1.0
minFilter AUTO
magFilter AUTO
useAutoMipmap false
internalFormat AUTO_INTERNAL_FORMAT
}

ACTION BEHAVIOR

OIV.Inventor.Actions.SoGLRenderAction, OIV.Inventor.Actions.SoCallbackAction Sets current texture in state.

See Also