3rd Eye Scene C#
3rd Eye Scene C# documentation
Tes::Shapes::PointCloud Class Reference

A simple implementation of the PointCloud interface. More...

Inheritance diagram for Tes::Shapes::PointCloud:
Tes::Shapes::MeshBase Tes::Shapes::MeshResource Tes::Resource

List of all members.

Public Member Functions

 PointCloud (uint id, int reserve=0)
 Construct a new point cloud.
override uint VertexCount (int stream=0)
 Overridden to access to the vertex count.
override uint IndexCount (int stream=0)
 Override.
override Vector3[] Vertices (int stream=0)
 Exposes the points as vertices.
override ushort[] Indices2 (int stream=0)
 override
override int[] Indices4 (int stream=0)
 Override.
override Vector3[] Normals (int stream=0)
 Override.
override Vector2[] UVs (int stream=0)
 Override.
override uint[] Colours (int stream=0)
 Override.
void AddPoint (Vector3 pos)
 Adds a point to the cloud.
void AddPoints (IEnumerable< Vector3 > positions)
 Add a set of points to the cloud.
void AddNormal (Vector3 normal)
 Add a point normal to the cloud.
void AddNormals (IEnumerable< Vector3 > normals)
 Adds a set of point normals.
void AddColour (uint colour)
 Add a point colour.
void AddColours (IEnumerable< uint > colours)
 Add a set of point colours.

Properties

override int IndexSize [get]
 Zero.
uint PointCount [get]
 The number of points in the cloud.
Vector3[] Points [get]
 Access the point vertex array (read only).
Vector3[] PointNormals [get]
 Access the point normals if present (read only).
uint[] PointColours [get]
 Access the point colours if present (read only).

Detailed Description

A simple implementation of the PointCloud interface.

This implementation stores point cloud positions, normals and colours in separate lists/arrays. Normals and colours are optional.

Note: when adding normals and/or colours it is essentially that the user maintain the correct number of normals/points, matching the PointCount. Otherwise, undefined behaviour may ensue.


Constructor & Destructor Documentation

Tes::Shapes::PointCloud::PointCloud ( uint  id,
int  reserve = 0 
) [inline]

Construct a new point cloud.

Parameters:
idThe cloud ID. Shared with other MeshResource objects.
reserveNumber of point vertices to reserve memroy for.

Member Function Documentation

void Tes::Shapes::PointCloud::AddColour ( uint  colour) [inline]

Add a point colour.

Parameters:
colourThe colour value.
void Tes::Shapes::PointCloud::AddColours ( IEnumerable< uint >  colours) [inline]

Add a set of point colours.

Parameters:
coloursThe colour values.
void Tes::Shapes::PointCloud::AddNormal ( Vector3  normal) [inline]

Add a point normal to the cloud.

Parameters:
normalThe point normals
void Tes::Shapes::PointCloud::AddNormals ( IEnumerable< Vector3 normals) [inline]

Adds a set of point normals.

Parameters:
normalsThe point normals to add.
void Tes::Shapes::PointCloud::AddPoint ( Vector3  pos) [inline]

Adds a point to the cloud.

Parameters:
posThe point position.
void Tes::Shapes::PointCloud::AddPoints ( IEnumerable< Vector3 positions) [inline]

Add a set of points to the cloud.

Parameters:
positionsThe points to add.
override uint [] Tes::Shapes::PointCloud::Colours ( int  stream = 0) [inline, virtual]

Override.

Parameters:
streamNot used.
Returns:
The point colours.

Implements Tes::Shapes::MeshBase.

override uint Tes::Shapes::PointCloud::IndexCount ( int  stream = 0) [inline, virtual]

Override.

Parameters:
streamNot used
Returns:
0

Implements Tes::Shapes::MeshBase.

override ushort [] Tes::Shapes::PointCloud::Indices2 ( int  stream = 0) [inline, virtual]

override

Parameters:
streamNot used.
Returns:
null

Reimplemented from Tes::Shapes::MeshBase.

override int [] Tes::Shapes::PointCloud::Indices4 ( int  stream = 0) [inline, virtual]

Override.

Parameters:
streamNot used.
Returns:
null

Reimplemented from Tes::Shapes::MeshBase.

override Vector3 [] Tes::Shapes::PointCloud::Normals ( int  stream = 0) [inline, virtual]

Override.

Parameters:
streamIgnored
Returns:
The point normals.

Implements Tes::Shapes::MeshBase.

override Vector2 [] Tes::Shapes::PointCloud::UVs ( int  stream = 0) [inline, virtual]

Override.

Parameters:
streamNot used.
Returns:
null

Implements Tes::Shapes::MeshBase.

override uint Tes::Shapes::PointCloud::VertexCount ( int  stream = 0) [inline, virtual]

Overridden to access to the vertex count.

Parameters:
streamUnused
Returns:
The point count.

Implements Tes::Shapes::MeshBase.

override Vector3 [] Tes::Shapes::PointCloud::Vertices ( int  stream = 0) [inline, virtual]

Exposes the points as vertices.

Parameters:
streamIgnored
Returns:
The point vertex array.

Implements Tes::Shapes::MeshBase.


Property Documentation

uint [] Tes::Shapes::PointCloud::PointColours [get]

Access the point colours if present (read only).

Null if unavailable.

Vector3 [] Tes::Shapes::PointCloud::PointNormals [get]

Access the point normals if present (read only).

Null if not using point normals.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties Events