# SoVRMLAppearance Class Reference
[VRML97 classes]

`#include <Inventor/VRMLnodes/SoVRMLAppearance.h>`

Inheritance diagram for SoVRMLAppearance:

List of all members.

## Detailed Description

The SoVRMLAppearance class specifies visual properties for shapes.

The detailed class documentation is taken verbatim from the VRML97 standard (ISO/IEC 14772-1:1997). It is copyright The Web3D Consortium, and is used by permission of the Consortium:

      Appearance {
        exposedField SFNode material          NULL
        exposedField SFNode texture           NULL
        exposedField SFNode textureTransform  NULL
      }

The Appearance node specifies the visual properties of geometry. The value for each of the fields in this node may be NULL. However, if the field is non-NULL, it shall contain one node of the appropriate type. The material field, if specified, shall contain a VRMLMaterial node. If the material field is NULL or unspecified, lighting is off (all lights are ignored during rendering of the object that references this Appearance) and the unlit object colour is (1, 1, 1). Details of the VRML lighting model are in 4.14, Lighting model (<http://www.web3d.org/technicalinfo/specifications/vrml97/part1/concepts.html#4.14>).

The texture field, if specified, shall contain one of the various types of texture nodes (VRMLImageTexture, VRMLMovieTexture, or VRMLPixelTexture). If the texture node is NULL or the texture field is unspecified, the object that references this Appearance is not textured. The textureTransform field, if specified, shall contain a VRMLTextureTransform node. If the textureTransform is NULL or unspecified, the textureTransform field has no effect.

## Public Member Functions

| SoVRMLAppearance (void)
virtual void | doAction (SoAction *action)
virtual void | callback (SoCallbackAction *action)
virtual void | GLRender (SoGLRenderAction *action)
virtual void | search (SoSearchAction *action)
virtual SoChildList * | getChildren (void) const
virtual void | notify (SoNotList *list)
virtual void | copyContents (const SoFieldContainer *from, SbBool copyConn)

## Static Public Member Functions

void | initClass (void)

## Public Attributes

SoSFNode | material
SoSFNode | texture
SoSFNode | textureTransform

## Protected Member Functions

virtual | ~SoVRMLAppearance ()

## Constructor & Destructor Documentation

SoVRMLAppearance::SoVRMLAppearance | ( | void |  | ) |

| Constructor.

SoVRMLAppearance::~SoVRMLAppearance | ( |  | ) | `[protected, virtual]`

| Destructor.

## Member Function Documentation

void SoVRMLAppearance::initClass | ( | void |  | ) | `[static]`

| Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system. Reimplemented from SoNode.

void SoVRMLAppearance::doAction | ( | SoAction * | action | ) | `[virtual]`

| This function performs the typical operation of a node for any action. Reimplemented from SoNode.

void SoVRMLAppearance::callback | ( | SoCallbackAction * | action | ) | `[virtual]`

| Action method for SoCallbackAction. Simply updates the state according to how the node behaves for the render action, so the application programmer can use the SoCallbackAction for extracting information about the scene graph. Reimplemented from SoNode.

void SoVRMLAppearance::GLRender | ( | SoGLRenderAction * | action | ) | `[virtual]`

| Action method for the SoGLRenderAction. This is called during rendering traversals. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method. Reimplemented from SoNode.

void SoVRMLAppearance::search | ( | SoSearchAction * | action | ) | `[virtual]`

Action method for SoSearchAction.

Compares the search criteria from the action to see if this node is a match. Searching is done by matching up all criteria set up in the SoSearchAction -- if any of the requested criteria is a miss, the search is not deemed successful for the node.

See also:
  SoSearchAction

Reimplemented from SoNode.

SoChildList * SoVRMLAppearance::getChildren | ( | void |  | ) | const`[virtual]`

| Returns list of children for this node. Reimplemented from SoNode.

void SoVRMLAppearance::notify | ( | SoNotList * | list | ) | `[virtual]`

| Notifies all auditors for this instance when changes are made. Reimplemented from SoNode.

void SoVRMLAppearance::copyContents | ( | const SoFieldContainer * | from,
|  | SbBool | copyConn
| ) | `[virtual]`

Makes a deep copy of all data of from into this instance, except external scenegraph references if copyconnections is `FALSE`.

This is the protected method that should be overridden by extension node / engine / dragger / whatever subclasses which needs to account for internal data that are not handled automatically.

Note that for simply copying e.g. a node from application code, it should be sufficient to do:

      SoNode * mynewnode = templatenode->copy();

Make sure that when you override the copyContents() method in your extension class that you also make it call upwards to it's parent superclass in the inheritance hierarchy, as copyContents() in for instance SoNode and SoFieldContainer does important work. It should go something like this:

      void
      MyCoinExtensionNode::copyContents(const SoFieldContainer * from,
                                        SbBool copyconnections)
      {
        // let parent superclasses do their thing (copy fields, copy
        // instance name, etc etc)
        SoNode::copyContents(from, copyconnections);

        // [..then copy internal data..]
      }

Reimplemented from SoNode.

## Member Data Documentation

SoSFNode SoVRMLAppearance::material

| Can contain an SoVRMLMaterial node. Is NULL by default.

SoSFNode SoVRMLAppearance::texture

| Can contain a texture node. Is NULL by default.

SoSFNode SoVRMLAppearance::textureTransform

| Can contain an SoVRMLTextureTransform node. Is NULL by default.

The documentation for this class was generated from the following files:

- SoVRMLAppearance.h
- Appearance.cpp