SoVRMLAppearance(3)

NAME
SoVRMLAppearance - 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:

SYNOPSIS

#include <Inventor/VRMLnodes/SoVRMLAppearance.h>

Inherits SoNode.

  Public Member Functions
virtual SoType getTypeId (void) const
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
static SoType getClassTypeId (void)
static void initClass (void)

  Public Attributes
SoSFNode material
SoSFNode texture
SoSFNode textureTransform

  Protected Member Functions
virtual const SoFieldData * getFieldData (void) const
virtual ~SoVRMLAppearance ()

  Static Protected Member Functions
static const SoFieldData ** getFieldDataPtr (void)

  Additional Inherited 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/x3d/specifications/vrml/ISO-IEC-14772-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.

Constructor & Destructor Documentation

  SoVRMLAppearance::SoVRMLAppearance (void)
Constructor.

  SoVRMLAppearance::~SoVRMLAppearance () [protected], [virtual]
Destructor.

Member Function Documentation

  SoType SoVRMLAppearance::getTypeId (void) const [virtual]
Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and 'downward' casting.

Usage example:

void foo(SoNode * node)
{
  if (node->getTypeId() == SoFile::getClassTypeId()) {
    SoFile * filenode = (SoFile *)node;  // safe downward cast, knows the type
  }
}

For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on.

For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups.

Implements SoBase.

  const SoFieldData * SoVRMLAppearance::getFieldData (void) const [protected], [virtual]
Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL.

Reimplemented from SoFieldContainer.

  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 * l) [virtual]
Notifies all auditors for this instance when changes are made.

Reimplemented from SoNode.

  void SoVRMLAppearance::copyContents (const SoFieldContainer * from, SbBool copyconnections) [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.

For copying nodes from application code, you should not invoke this function directly, but rather call the SoNode::copy() function:

SoNode * mynewnode = templatenode->copy();

The same also goes for engines.

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.

Author

Generated automatically by Doxygen for Coin from the source code.