Web Analytics Made Easy - Statcounter
Skip to content

Class SBMVisualModelSurface#

ClassList > SBMVisualModelSurface

This class is the base class to describe a visual model surface. More...

  • #include <SBMVisualModelSurface.hpp>

Inherits the following classes: SBCReferenceTarget

Public Functions#

Type Name
SBMVisualModelSurface (unsigned int numberOfTriangles, unsigned int numberOfPositions, unsigned int * indexData, float * positionData, float * normalData, float * colorData, unsigned int * flagData, unsigned int * nodeIndexData, float * textureCoordinateData, SBTexture * diffuseTexture)
Builds a triangle surface.
float * getColorData () const
Returns the color data.
SBTexture * getDiffuseTexture () const
Returns the diffuse texture.
unsigned int * getFlagData () const
Returns the flag data.
unsigned int * getIndexData () const
Returns the index data.
unsigned int * getNodeIndexData () const
Returns the node index data.
float * getNormalData () const
Returns the normal data.
unsigned int getNumberOfPositions () const
Returns the number of positions.
unsigned int getNumberOfTriangles () const
Returns the number of triangles.
float * getPositionData () const
Returns the position data.
float * getTextureCoordinateData () const
Returns the texture coordinate data.
void setColorData (float * colorData)
Sets the color data.
void setDiffuseTexture (SBTexture * diffuseTexture)
Sets the diffuse texture.
void setFlagData (unsigned int * flagData)
Sets the flag data.
void setIndexData (unsigned int * indexData)
Sets the index data.
void setNodeIndexData (unsigned int * nodeIndexData)
Sets the node index data.
void setNormalData (float * normalData)
Sets the normal data.
void setNumberOfPositions (unsigned int numberOfPositions)
Sets the number of positions.
void setNumberOfTriangles (unsigned int numberOfTriangles)
Sets the number of triangles.
void setPositionData (float * positionData)
Sets the position data.
void setTextureCoordinateData (float * textureCoordinateData)
Sets the texture coordinate data.
virtual ~SBMVisualModelSurface ()
Deletes the triangle surface.

Public Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTarget ()
Builds the reference target.
unsigned int getMemoryFootprint () const
Returns the memory footprint.
void printReferencesToOwners () const
Prints the references to the owners of this reference target.
virtual ~SBCReferenceTarget ()
Destructor.

Protected Attributes inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTargetData * dataPointer
A pointer to the private data.

Protected Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTarget (SBCReferenceTargetData * dataPointer)
Protected constructor.
void removeAllReferenceOwners ()
Stops all the reference owners from referencing this reference target.

Detailed Description#

Short name: SBSurface

Public Functions Documentation#

function SBMVisualModelSurface#

Builds a triangle surface.

SBMVisualModelSurface::SBMVisualModelSurface (
    unsigned int numberOfTriangles,
    unsigned int numberOfPositions,
    unsigned int * indexData,
    float * positionData,
    float * normalData,
    float * colorData,
    unsigned int * flagData,
    unsigned int * nodeIndexData,
    float * textureCoordinateData,
    SBTexture * diffuseTexture
) 

Constructs a visual model surface with the specified geometry and texture data.

Parameters:

  • numberOfTriangles The number of triangles that compose the surface.
  • numberOfPositions The number of vertex positions in the surface.
  • indexData Pointer to the array of triangle indices.
  • positionData Pointer to the array of vertex positions.
  • normalData Pointer to the array of vertex normals.
  • colorData Pointer to the array of vertex colors.
  • flagData Pointer to the array of vertex flags.
  • nodeIndexData Pointer to the array of node indices associated with vertices.
  • textureCoordinateData Pointer to the array of texture coordinates.
  • diffuseTexture Pointer to the diffuse texture applied to the surface.

function getColorData#

Returns the color data.

float * SBMVisualModelSurface::getColorData () const

Retrieves the color data array.

Returns:

Pointer to the array of vertex colors.


function getDiffuseTexture#

Returns the diffuse texture.

SBTexture * SBMVisualModelSurface::getDiffuseTexture () const

Retrieves the diffuse texture applied to the surface.

Returns:

Pointer to the diffuse texture.


function getFlagData#

Returns the flag data.

unsigned int * SBMVisualModelSurface::getFlagData () const

Retrieves the flag data array.

Returns:

Pointer to the array of vertex flags.


function getIndexData#

Returns the index data.

unsigned int * SBMVisualModelSurface::getIndexData () const

Retrieves the index data array.

Returns:

Pointer to the array of triangle indices.


function getNodeIndexData#

Returns the node index data.

unsigned int * SBMVisualModelSurface::getNodeIndexData () const

Retrieves the node index data array.

Returns:

Pointer to the array of node indices associated with vertices.


function getNormalData#

Returns the normal data.

float * SBMVisualModelSurface::getNormalData () const

Retrieves the normal data array.

Returns:

Pointer to the array of vertex normals.


function getNumberOfPositions#

Returns the number of positions.

unsigned int SBMVisualModelSurface::getNumberOfPositions () const

Retrieves the number of vertex positions in the surface.

Returns:

The number of positions.


function getNumberOfTriangles#

Returns the number of triangles.

unsigned int SBMVisualModelSurface::getNumberOfTriangles () const

Retrieves the number of triangles in the surface.

Returns:

The number of triangles.


function getPositionData#

Returns the position data.

float * SBMVisualModelSurface::getPositionData () const

Retrieves the position data array.

Returns:

Pointer to the array of vertex positions.


function getTextureCoordinateData#

Returns the texture coordinate data.

float * SBMVisualModelSurface::getTextureCoordinateData () const

Retrieves the texture coordinate data array.

Returns:

Pointer to the array of texture coordinates.


function setColorData#

Sets the color data.

void SBMVisualModelSurface::setColorData (
    float * colorData
) 

Sets the color data array.

Parameters:

  • colorData Pointer to the new array of vertex colors.

function setDiffuseTexture#

Sets the diffuse texture.

void SBMVisualModelSurface::setDiffuseTexture (
    SBTexture * diffuseTexture
) 

Sets the diffuse texture for the surface.

Parameters:

  • diffuseTexture Pointer to the new diffuse texture.

function setFlagData#

Sets the flag data.

void SBMVisualModelSurface::setFlagData (
    unsigned int * flagData
) 

Sets the flag data array.

Parameters:

  • flagData Pointer to the new array of vertex flags.

function setIndexData#

Sets the index data.

void SBMVisualModelSurface::setIndexData (
    unsigned int * indexData
) 

Sets the index data array.

Parameters:

  • indexData Pointer to the new array of triangle indices.

function setNodeIndexData#

Sets the node index data.

void SBMVisualModelSurface::setNodeIndexData (
    unsigned int * nodeIndexData
) 

Sets the node index data array.

Parameters:

  • nodeIndexData Pointer to the new array of node indices.

function setNormalData#

Sets the normal data.

void SBMVisualModelSurface::setNormalData (
    float * normalData
) 

Sets the normal data array.

Parameters:

  • normalData Pointer to the new array of vertex normals.

function setNumberOfPositions#

Sets the number of positions.

void SBMVisualModelSurface::setNumberOfPositions (
    unsigned int numberOfPositions
) 

Sets the number of vertex positions in the surface.

Parameters:

  • numberOfPositions The new number of positions.

function setNumberOfTriangles#

Sets the number of triangles.

void SBMVisualModelSurface::setNumberOfTriangles (
    unsigned int numberOfTriangles
) 

Sets the number of triangles in the surface.

Parameters:

  • numberOfTriangles The new number of triangles.

function setPositionData#

Sets the position data.

void SBMVisualModelSurface::setPositionData (
    float * positionData
) 

Sets the position data array.

Parameters:

  • positionData Pointer to the new array of vertex positions.

function setTextureCoordinateData#

Sets the texture coordinate data.

void SBMVisualModelSurface::setTextureCoordinateData (
    float * textureCoordinateData
) 

Sets the texture coordinate data array.

Parameters:

  • textureCoordinateData Pointer to the new array of texture coordinates.

function ~SBMVisualModelSurface#

Deletes the triangle surface.

virtual SBMVisualModelSurface::~SBMVisualModelSurface () 

Destroys the visual model surface and releases its associated resources.