Wireframe Class Referenceabstract

#include <Wireframe.h>

Inheritance diagram for Wireframe:
VisualComponent Asterisk Line Mesh Sphere

# Public Types

typedef const WireframeSpec WireframeROMSpec

# Public Member Functions

void constructor (Entity owner, const WireframeSpec *wireframeSpec)
void setDisplacement (Vector3D displacement)
bool isVisible ()
bool prepareForRender (Vector3D *relativePosition, const Vector3D *cameraDirection)
virtual VirtualList getVertices ()
virtual void render (Vector3D relativePosition)
virtual bool draw ()=0

# Private Attributes

Vector3D displacement
 Displacement relative to the owner's spatial position.
fixed_ext_t squaredDistanceToCamera
 Wireframe's squared distance to the camera's position.
bool drawn
 Flag that indicates that the wireframe has been drawn.
bool interlaced
 Flag to render the wireframe in interlaced mode.
uint8 color
 Color for the wireframe.
uint8 bufferIndex
 Index of the last frame buffer used in interlaced mode.
- Private Attributes inherited from VisualComponent
AnimationController animationController
 Animation controller.
uint8 transparency
 Transparecy effect (__TRANSPARENCY_NONE, __TRANSPARENCY_EVEN or __TRANSPARENCY_ODD)
uint8 show
 Show state flag (__HIDE, __SHOW)
bool rendered
 Rendering status flag.
bool updateAnimationFrame
 Flag to allow/prohibit the update of the animation.

# Additional Inherited Members

- Private Types inherited from VisualComponent
enum  VisualComponentCommands
typedef const AnimationFunction AnimationFunctionROMSpec
- Private Member Functions inherited from VisualComponent
void constructor (Entity owner, const VisualComponentSpec *visualComponentSpec)
override void handleCommand (int32 command, va_list args)
void show ()
 Make the visual component visible.
void hide ()
 Make the visual component invisible.
uint8 getTransparent ()
void setTransparency (uint8 transparency)
bool play (const char *animationName, ListenerObject scope)
bool replay ()
void pause (bool pause)
void stop ()
 Stop any playing animation if any.
bool isPlaying ()
bool isPlayingAnimation (char *animationName)
void nextFrame ()
 Skip the currently playing animation to the next frame.
void previousFrame ()
 Rewind the currently playing animation to the previous frame.
void setActualFrame (int16 actualFrame)
int16 getActualFrame ()
void setFrameDuration (uint8 frameDuration)
uint8 getFrameDuration ()
 Retrieve the duration in game cycles for each frame of animation.
void setFrameDurationDecrement (uint8 frameDurationDecrement)
const char * getPlayingAnimationName ()
AnimationController getAnimationController ()
virtual void createAnimationController ()
 Create an animation controller for this sprite.
virtual void forceChangeOfFrame (int16 actualFrame)

# Detailed Description

Class Wireframe

Inherits from VisualComponent

Draws 3D shapes to the frame buffers.

Definition at line 70 of file Wireframe.h.

# Member Typedef Documentation

# WireframeROMSpec

A Wireframe spec that is stored in ROM

Definition at line 59 of file Wireframe.h.

# Member Function Documentation

# constructor()

void Wireframe::constructor ( Entity owner,
const WireframeSpec * wireframeSpec )

Class' constructor

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

Definition at line 35 of file Wireframe.c.

# draw()

virtual bool Wireframe::draw ( )
pure virtual

Draw the wireframe to the frame buffers.

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

Implemented in Asterisk, Line, Mesh, and Sphere.

# getVertices()

VirtualList Wireframe::getVertices ( )
virtual

Retrieve the list of vertices that compose the mesh.

Returns
Linked list of vertices

Reimplemented in Mesh.

Definition at line 195 of file Wireframe.c.

# isVisible()

bool Wireframe::isVisible ( )

Check if the wireframe is visible.

Returns
True if the wireframe is visible; false otherwise

Definition at line 80 of file Wireframe.c.

# prepareForRender()

bool Wireframe::prepareForRender ( Vector3D * relativePosition,
const Vector3D * cameraDirection )

Configure the wireframe to be drawn.

Parameters
relativePositionrelativePosition: Wireframe's position relative to the camera's position
cameraDirectionDirection towards which the camera is facing
Returns
True if the wireframe is visible within the camera's frustum; false otherwise

Definition at line 87 of file Wireframe.c.

# render()

void Wireframe::render ( Vector3D relativePosition)
virtual

Prepare the wireframe for drawing.

Parameters
relativePositionPosition relative to the camera's

Reimplemented in Asterisk, Line, Mesh, and Sphere.

Definition at line 202 of file Wireframe.c.

# setDisplacement()

void Wireframe::setDisplacement ( Vector3D displacement)

Set the displacement relative to the owner's spatial position

Parameters
displacementDisplacement relative to the owner's spatial position

Definition at line 73 of file Wireframe.c.

# Member Data Documentation

# bufferIndex

uint8 Wireframe::bufferIndex
private

Index of the last frame buffer used in interlaced mode.

Definition at line 88 of file Wireframe.h.

# color

uint8 Wireframe::color
private

Color for the wireframe.

Definition at line 85 of file Wireframe.h.

# displacement

Vector3D Wireframe::displacement
private

Displacement relative to the owner's spatial position.

Definition at line 73 of file Wireframe.h.

# drawn

bool Wireframe::drawn
private

Flag that indicates that the wireframe has been drawn.

Definition at line 79 of file Wireframe.h.

# interlaced

bool Wireframe::interlaced
private

Flag to render the wireframe in interlaced mode.

Definition at line 82 of file Wireframe.h.

# squaredDistanceToCamera

fixed_ext_t Wireframe::squaredDistanceToCamera
private

Wireframe's squared distance to the camera's position.

Definition at line 76 of file Wireframe.h.


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