Mesh Class Reference

#include <Mesh.h>

Inheritance diagram for Mesh:
Wireframe

# Public Types

typedef const MeshSpec MeshROMSpec

# Public Member Functions

void constructor (Entity owner, const MeshSpec *meshSpec)
override RightBox getRightBox ()
override VirtualList getVertices ()
override void render (Vector3D relativePosition)
override bool draw ()
void addSegments (PixelVector(*segments)[2], Vector3D displacement)
void addSegment (Vector3D startVector, Vector3D endVector)
bool drawInterlaced ()

# Static Protected Member Functions

static RightBox getRightBoxFromSpec (MeshSpec *meshSpec)

# Protected Attributes

VirtualList segments
 List of segments.
VirtualList vertices
 List of vertices.

# Additional Inherited Members

- Private Types inherited from Wireframe
typedef const WireframeSpec WireframeROMSpec
- Private Member Functions inherited from Wireframe
void constructor (Entity owner, const WireframeSpec *wireframeSpec)
void setDisplacement (Vector3D displacement)
bool isVisible ()
bool prepareForRender (Vector3D *relativePosition, const Vector3D *cameraDirection)

# Detailed Description

Class Mesh

Inherits from Wireframe

Draws the segments that compose the mesh.

Definition at line 72 of file Mesh.h.

# Member Typedef Documentation

# MeshROMSpec

typedef const MeshSpec MeshROMSpec

A Mesh spec that is stored in ROM

Definition at line 37 of file Mesh.h.

# Member Function Documentation

# addSegment()

void Mesh::addSegment ( Vector3D startVector,
Vector3D endVector )

Create a new segment from provided vectors.

Parameters
startVectorNew segment's starting point
endVectorNew segment's end point

Definition at line 385 of file Mesh.c.

# addSegments()

void Mesh::addSegments ( PixelVector(*) segments[2],
Vector3D displacement )

Create new segments from the provided array.

Parameters
segmentsArray of segments holding their spatial data
displacementDisplacement to add to the segments' vertices

Definition at line 352 of file Mesh.c.

# constructor()

void Mesh::constructor ( Entity owner,
const MeshSpec * meshSpec )

Class' constructor

Parameters
ownerEntity to which the wireframe attaches to
meshSpecSpecification that determines how to configure the wireframe

Definition at line 158 of file Mesh.c.

# draw()

bool Mesh::draw ( )
virtual

Draw the wireframe to the frame buffers.

Returns
True if at least one pixel is drawn; false otherwise

Implements Wireframe.

Definition at line 326 of file Mesh.c.

# drawInterlaced()

bool Mesh::drawInterlaced ( )

Draw the wireframe to the frame buffers in interlaced mode.

Returns
True if at least one pixel is drawn; false otherwise

Definition at line 433 of file Mesh.c.

# getRightBox()

RightBox Mesh::getRightBox ( )
virtual

Retrieve the mesh's bounding box.

Returns
Bounding box of the mesh

Reimplemented from Component.

Definition at line 186 of file Mesh.c.

# getRightBoxFromSpec()

static RightBox Mesh::getRightBoxFromSpec ( MeshSpec * meshSpec)
staticprotected

Retrieve the bounding box defined by the provided mesh spec's values.

Returns
Bounding box of the resulting mesh

Definition at line 36 of file Mesh.c.

# getVertices()

VirtualList Mesh::getVertices ( )
virtual

Retrieve the list of vertices that compose the mesh.

Returns
Linked list of vertices

Reimplemented from Wireframe.

Definition at line 232 of file Mesh.c.

# render()

void Mesh::render ( Vector3D relativePosition)
virtual

Prepare the wireframe for drawing.

Parameters
relativePositionPosition relative to the camera's

Reimplemented from Wireframe.

Definition at line 239 of file Mesh.c.

# Member Data Documentation

# segments

VirtualList Mesh::segments
protected

List of segments.

Definition at line 77 of file Mesh.h.

# vertices

VirtualList Mesh::vertices
protected

List of vertices.

Definition at line 80 of file Mesh.h.


The documentation for this class was generated from the following files:
  • VUEngine-Core/source/Component/VisualComponent/Wireframe/Mesh/Mesh.h
  • VUEngine-Core/source/Component/VisualComponent/Wireframe/Mesh/Mesh.c