SoHeightMapToNormalMap(3)

NAME
SoHeightMapToNormalMap - Engine for computing a normal map from a height map.

SYNOPSIS

#include <Inventor/engines/SoHeightMapToNormalMap.h>

Inherits SoTexture2Convert.

  Public Types
enum NormalMapFormat { INT8 }

  Public Member Functions
virtual SoType getTypeId (void) const
virtual const SoFieldData * getFieldData (void) const
virtual const SoEngineOutputData * getOutputData (void) const
SoHeightMapToNormalMap (void)

  Static Public Member Functions
static SoType getClassTypeId (void)
static void * createInstance (void)
static void initClass (void)
Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.
static void convert (const unsigned char *srcptr, SbVec2s size, int nc, SbImage &dst_out)

  Public Attributes
SoSFEnum format

  Protected Member Functions
virtual void inputChanged (SoField *which)
virtual void evaluate (void)

  Static Protected Member Functions
static const SoFieldData ** getInputDataPtr (void)
static const SoEngineOutputData ** getOutputDataPtr (void)

  Additional Inherited Members

Detailed Description

Engine for computing a normal map from a height map. This engine will create a normal map texture from a height map texture. You can use it in an Inventor file like this:

Texture2 {
  image = HeightMapToNormalMap {
    sourceImage = Texture2 { filename "HeightMap.jpg" } . image
  } . image
}

Be aware that the field connections will remain active, so both Texture2 nodes and the HeightMapToNormalMap engine will be kept resident in memory (unless you intervene manually and detach the engine) even though only the 'outer' Texture2 node is needed. This can give quite a big memory use overhead.

Be aware that this class is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
Since
    Coin 3.0

Member Enumeration Documentation

  enum SoHeightMapToNormalMap::NormalMapFormat
Enumeration of available normal map formats.

Enumerator

INT8
    Encode the normals as a 3 component byte texture. This is the only option for now, as long as float textures are not conveniently supported in Coin.

Constructor & Destructor Documentation

  SoHeightMapToNormalMap::SoHeightMapToNormalMap (void)
Constructor.

Member Function Documentation

  SoType SoHeightMapToNormalMap::getClassTypeId (void) [static]
This static method returns the SoType object associated with objects of this class.

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

Reimplemented from SoTexture2Convert.

  const SoFieldData ** SoHeightMapToNormalMap::getInputDataPtr (void) [static], [protected]
Returns the SoFieldData class which holds information about inputs in this engine.

  const SoEngineOutputData ** SoHeightMapToNormalMap::getOutputDataPtr (void) [static], [protected]
Returns the SoEngineOutputData class which holds information about the outputs in this engine.

  const SoFieldData * SoHeightMapToNormalMap::getFieldData (void) const [virtual]
Returns the SoFieldData class which holds information about inputs in this engine.

Reimplemented from SoTexture2Convert.

  const SoEngineOutputData * SoHeightMapToNormalMap::getOutputData (void) const [virtual]
Returns the SoEngineOutputData class which holds information about the outputs in this engine.

Reimplemented from SoTexture2Convert.

  void * SoHeightMapToNormalMap::createInstance (void) [static]
Creates a new instance of the class type corresponding to the SoType object.

  void SoHeightMapToNormalMap::convert (const unsigned char * srcptr, SbVec2s size, int nc, SbImage & dst_out) [static]
Static function for computing a normal map from a height map. This function can be used directly without any engine instantiation.

  void SoHeightMapToNormalMap::inputChanged (SoField * which) [protected], [virtual]
Called when an input is changed. The default method does nothing, but subclasses may override this method to do The Right Thing when a specific field is changed.

Reimplemented from SoEngine.

  void SoHeightMapToNormalMap::evaluate (void) [protected], [virtual]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Implements SoEngine.

Member Data Documentation

  SoMFEnum SoHeightMapToNormalMap::format
This setting decides what kind of normal map is generated. For now, only the INT8 format is available, and it is the default value.

Author

Generated automatically by Doxygen for Coin from the source code.