Web Analytics Made Easy - Statcounter
Skip to content

Class SBMVisualModelTriangleArray#

ClassList > SBMVisualModelTriangleArray

This class describes an array of triangles. More...

  • #include <SBMVisualModelTriangleArray.hpp>

Inherits the following classes: SBMVisualModelGeometryArray

Public Types inherited from SBMVisualModelGeometryArray#

See SBMVisualModelGeometryArray

Type Name
enum Type
The available geometry array types.

Public Functions#

Type Name
SBMVisualModelTriangleArray (unsigned int numberOfTriangles, unsigned int numberOfPositions, unsigned int * indexData, float * positionData, float * normalData, float * colorData, SBDDataGraphNodeMaterial ** materialData, SBDDataGraphNode ** nodeData, unsigned int * flagData, unsigned int * nodeIndexData, float * textureCoordinateData, SBTexture * diffuseTexture, SBSpatialTransform * transform)
Builds a triangle array.
SBTexture * getDiffuseTexture () const
Returns the diffuse texture.
float * getNormalData () const
Returns the normal data.
float * getTextureCoordinateData () const
Returns the texture coordinate data.
virtual SBMVisualModelGeometryArray::Type getType () override const
Returns SBMVisualModelGeometryArray::Type::Triangle .
void setDiffuseTexture (SBTexture * diffuseTexture)
Sets the diffuse texture.
void setNormalData (float * normalData)
Sets the normal data.
void setTextureCoordinateData (float * textureCoordinateData)
Sets the texture coordinate data.
virtual ~SBMVisualModelTriangleArray ()
Deletes the triangle array.

Public Functions inherited from SBMVisualModelGeometryArray#

See SBMVisualModelGeometryArray

Type Name
SBMVisualModelGeometryArray (SBMVisualModelGeometryArrayData * dataPointer)
Builds a geometry array.
float * getColorData () const
Returns the color data.
unsigned int * getFlagData () const
Returns the flag data.
unsigned int * getIndexData () const
Returns the index data.
SBDDataGraphNodeMaterial ** getMaterialData () const
Returns the material data.
SBDDataGraphNode ** getNodeData () const
Returns the node data.
unsigned int * getNodeIndexData () const
Returns the node index data.
unsigned int getNumberOfGeometries () const
Returns the number of geometries.
unsigned int getNumberOfPositions () const
Returns the number of positions.
float * getPositionData () const
Returns the position data.
SBSpatialTransform * getTransform () const
Returns the transform.
virtual Type getType () const = 0
Returns the type of geometry array.
void setColorData (float * colorData)
Sets the color data.
void setFlagData (unsigned int * flagData)
Sets the flag data.
void setIndexData (unsigned int * indexData)
Sets the index data.
void setMaterialData (SBDDataGraphNodeMaterial ** materialData)
Sets the material data.
void setNodeData (SBDDataGraphNode ** nodeData)
Sets the node data.
void setNodeIndexData (unsigned int * nodeIndexData)
Sets the node index data.
void setNumberOfGeometries (unsigned int numberOfGeometries)
Sets the number of geometries.
void setNumberOfPositions (unsigned int numberOfPositions)
Sets the number of positions.
void setPositionData (float * positionData)
Sets the position data.
void setTransform (SBSpatialTransform * transform)
Sets the transform.
virtual ~SBMVisualModelGeometryArray ()
Deletes the geometry array.

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: SBTriangleArray

Public Functions Documentation#

function SBMVisualModelTriangleArray#

Builds a triangle array.

SBMVisualModelTriangleArray::SBMVisualModelTriangleArray (
    unsigned int numberOfTriangles,
    unsigned int numberOfPositions,
    unsigned int * indexData,
    float * positionData,
    float * normalData,
    float * colorData,
    SBDDataGraphNodeMaterial ** materialData,
    SBDDataGraphNode ** nodeData,
    unsigned int * flagData,
    unsigned int * nodeIndexData,
    float * textureCoordinateData,
    SBTexture * diffuseTexture,
    SBSpatialTransform * transform
) 

Constructs a triangle array visual model.

Creates a visual model representing an array of triangles with the specified geometry and optional texture.

Parameters:

  • numberOfTriangles Number of triangles in the array.
  • numberOfPositions Number of vertex positions.
  • indexData Pointer to the index data array.
  • positionData Pointer to the position data array.
  • normalData Pointer to the normal data array.
  • colorData Pointer to the color data array.
  • materialData Pointer to an array of material data pointers.
  • nodeData Pointer to an array of node data pointers.
  • flagData Pointer to an array of flag values per triangle.
  • nodeIndexData Pointer to an array of node index values per triangle.
  • textureCoordinateData Pointer to the texture coordinate data array.
  • diffuseTexture Pointer to the diffuse texture object.
  • transform Pointer to the spatial transform applied to the model.

function getDiffuseTexture#

Returns the diffuse texture.

SBTexture * SBMVisualModelTriangleArray::getDiffuseTexture () const

Retrieves the diffuse texture associated with the triangle array.

Returns:

Pointer to the diffuse texture.


function getNormalData#

Returns the normal data.

float * SBMVisualModelTriangleArray::getNormalData () const

Retrieves the pointer to the normal data array.

Returns:

Pointer to the normal data.


function getTextureCoordinateData#

Returns the texture coordinate data.

float * SBMVisualModelTriangleArray::getTextureCoordinateData () const

Retrieves the pointer to the texture coordinate data array.

Returns:

Pointer to the texture coordinate data.


function getType#

Returns SBMVisualModelGeometryArray::Type::Triangle .

virtual SBMVisualModelGeometryArray::Type SBMVisualModelTriangleArray::getType () override const

Returns the geometry type of this visual model.

Returns:

The geometry type, which is SBMVisualModelGeometryArray::Type::Triangle.

Implements SBMVisualModelGeometryArray::getType


function setDiffuseTexture#

Sets the diffuse texture.

void SBMVisualModelTriangleArray::setDiffuseTexture (
    SBTexture * diffuseTexture
) 

Sets the diffuse texture for the triangle array.

Parameters:

  • diffuseTexture Pointer to the diffuse texture to set.

function setNormalData#

Sets the normal data.

void SBMVisualModelTriangleArray::setNormalData (
    float * normalData
) 

Sets the normal data array pointer.

Parameters:

  • normalData Pointer to the new normal data array.

function setTextureCoordinateData#

Sets the texture coordinate data.

void SBMVisualModelTriangleArray::setTextureCoordinateData (
    float * textureCoordinateData
) 

Sets the texture coordinate data array pointer.

Parameters:

  • textureCoordinateData Pointer to the new texture coordinate data array.

function ~SBMVisualModelTriangleArray#

Deletes the triangle array.

virtual SBMVisualModelTriangleArray::~SBMVisualModelTriangleArray () 

Destroys the triangle array visual model and releases its resources.